TomographicImaging / eqt

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

The dictionary of widgets should check for the double usage of qwidgets, qlabels, names #108

Closed DanicaSTFC closed 4 months ago

DanicaSTFC commented 8 months ago

https://github.com/TomographicImaging/eqt/blob/e400a098d616d2c2cf9a9adb46bb52f50384bd1f/eqt/ui/UIFormWidget.py#L142C9-L142C9

If a widget is already used in the form and added for a second time to the form, there should be a key error. At the current state, the widget is taken away from its original qlabel and reassigned to a new qlabel. Similarly, if multiple qwidgets and qlabels are assigned with the same name, they will appear multiple times in the form but the dictionary entry will be only determined by its name once. This could be checked by sending a key error to notify the name is already in use.

DanicaSTFC commented 6 months ago

PR #109 resolved the double use of a name by raising a key error. The double usage of the widget is still pending.

A new method to move widgets in the layout could be added. Issue #120 has been opened to address this.