Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Widgets disabled from startup: disabling in Qt Designer or in code?
isaacEnrique last edited by
I have made several applications which use QtDesigner to create the corresponding Graphical User Interface.
My question on this matter is simple, however that may not have a unique and precise answer, I wonder what is most recommended.
When some GUI widgets should be disabled at startup: Is it better to establish disabling directly on the QtDesigner form or is best done in code (as in a class constructor, for example)?
This question could be generalized to cover the initial settings of the widgets (not only the state enabled/disabled).
Thanks in advance for any help and / or suggestions.
mcosta last edited by
using QT Designer is easier but less flexible; if you want reuse the same UI for different widgets I suggest to create a method/slot that applies your settings according your rules.