Where can I find a good documentation on how to refer (to call) to the Dialog created with QtDesigner? For example, a buttomBox (or any other) just created. I’m trying to make a plugin, but the tutorials I’ve seen just throw this information in and I just don’t get how to do with the others Widgets. How do I link them in my code? Where is this information? I need to know it for PyQt4. The API I find is not in python. Or is just specified for the use of PyQt4, and I just don’t find, or don’t understand, how to call them to my scripts I already have. PS: I use the Plugin Builder and already have some code of my own, but don’t know how to use them together to work as a plugin.
If you create a plugin with Plugin Builder Plugin, let's say a dockwidget, all in all it is self-explaning. You should see in the generated file [plugin_name]_dockwidget.py the comments
# Set up the user interface from Designer. # After setupUI you can access any designer object by doing # self.<objectname>, and you can use autoconnect slots - see # http://qt-project.org/doc/qt-4.8/designer-using-a-ui-file.html # #widgets-and-dialogs-with-auto-connect
This is from a plugin for QGIS 2, but applies also for PyQGIS 3 and explains well what to do.
For example, when you create a
my_push_button with QtDesigner you access it via e.g.
within the dockwidget class, where
the_method(self) is called when the button is clicked.