The documentation for QObject::findChildren() says that the first argument should be a QString that names the type (ie. class) of the widgets you want to retrieve.
In C++, this is implemented using templates, as the documentation shows. I do not know how this is done in python.
In addition, you are using the name of your class (Ui_Dialog), not the name of the variable that implements that class in your dialog. So at a minimum, your code should look something like this:
self.
ui.
findChildren( QWidgets.
QLabel )
self.ui.findChildren( QWidgets.QLabel )
To copy to clipboard, switch view to plain text mode
assuming QWidgets.QLabel is the correct syntax for the argument. Perhaps it should be "QWidgets.QLabel" (ie. a quoted string) instead.
Or maybe you don't need the "ui" variable at all:
self.
findChildren( QWidgets.
QLabel )
self.findChildren( QWidgets.QLabel )
To copy to clipboard, switch view to plain text mode
where "self" is your Dialog class instance.
Bookmarks