Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Enable child widgets
Qt 6.11 is out! See what's new in the release blog

Enable child widgets

Scheduled Pinned Locked Moved Solved General and Desktop
widget
2 Posts 2 Posters 791 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    firen
    wrote on last edited by firen
    #1

    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?

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by mrjj
      #2

      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.

      1 Reply Last reply
      1

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved