PyQ5t: load Qt Designer into Python script (loadUiType): how to check error cause?
Question: I design GUI in Qt Designer, then I load UI-file in my Puthon3 script with the
loadUiType method:

    
    
    class Main(QMainWindow, uic.loadUiType("adc_main_form.ui")[0]):
    def __init__(self):
        super(Main, self).__init__()
        self.setupUi(self)
    

All works fine. Then I make a little revolution in my form design and it
includes a lot of renaming. So I take that UI-file of Qt Designer (XML file)
and edit it in a text editor. Maybe I make some typo mistakes. Now I get a
message during the start of Python script, on the line self.setupUi(self):

> File "string", line 671, in setupUi
>
> TypeError: argument 1 has unexpected type 'QRadioButton'

So, some goes wrong in the process of importing the XML file. But the error
type tells me not enough to find the error.

I double check all my QRadioButton widgets. No idea.

I open Ui with the Designer - it opens without error messages.

I convert UI into PY (pyiuc5) - no errors.

The `.ui` file is [here](https://gist.github.com/KubaO/601b3c867f6d3cd6d9c9).

What can be the way to find the error in such a closed process as setupUI?


Answer: In this .ui file the widgets have the same name as the main window's slots. As
we subclass the main window, both the widgets and the slots are in the same
namespace, so command `self.zero_fix = QtWidgets.QRadioButton(self.frame_4)`
in compiled .ui file overwrite slot `zero_fix()`

