Enable child widgets
-
Hi,
one short question. I try to figure out, in which situations I have to set widget propertys for every childwidget explicit.
In the documentation ( https://doc.qt.io/qt-5/qwidget.html#updatesEnabled-prop ) I found the following:
"Disabling a widget implicitly disables all its children. Enabling a widget enables all child widgets except top-level widgets or those that have been explicitly disabled. Re-enabling updates implicitly calls update() on the widget."
That sounds like a widget could be a top-level widget and a child widget at the same time, what makes no sense for me...
Could someone clarify what the sentence mean?
Thanks! :-)
PS: Is it the general rule that property-states are applied to every child widget if they are not explicitly set to a different state?
-
Hi
I think top-level widgets refer to "Windows" . as in the floating kind.
So maybe it says that it won't disable them even if it technically is kinda a child ?-
Is it the general rule that property-states are applied to every child widget if they are not explicitly set to a different state?
Its by design choice when a common state makes sense. so no, it's not a rule. -
which situations I have to set widget properties for every childwidget explicit.
Mostly when your apps design requires such. Like same color of x items.
Not so much for QWidgets standard behavior with enable/show/hide/scale.
-