TomographicImaging / eqt

A number of templates and tools to develop Qt GUI's with Python effectively.
Other
2 stars 3 forks source link

UIFormFactory.getQDockWidget doesn't work #15

Closed lauramurgatroyd closed 3 years ago

lauramurgatroyd commented 3 years ago

https://github.com/paskino/qt-elements/blob/6f0edc0ea65eed1b4e0598cf19db2457c5853bb3/eqt/ui/UIFormWidget.py#L107

A QDockWidget must have a QWidget() added which then contains all of the widgets. Instead what we do here is add all the separate widgets onto the dockwidget and this doesn't work:

https://github.com/paskino/qt-elements/blob/6f0edc0ea65eed1b4e0598cf19db2457c5853bb3/eqt/ui/UIFormWidget.py#L89

Instead we should do something like:

dockwidget = QDockWidget()
formwidget = UIFormFactory.getQWidget()
dockwidget.setWidget(formwidget)

Then we have to call dockwidget.widget().addWidget() to add widgets to the form