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. how to "hide" a QBoxLayout in a dialog?
Forum Updated to NodeBB v4.3 + New Features

how to "hide" a QBoxLayout in a dialog?

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 348 Views 2 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.
  • D Offline
    D Offline
    davecotter
    wrote on last edited by
    #1

    my dialogs can dynamically hide sections depending on the app configuration. I can easily do that with any object derived fro QWidget, since there is a "hide" method, but what about QBoxLayout? must i enclose that in some QWidget container just to get access to a hide() method? thanks

    1 Reply Last reply
    0
    • D Offline
      D Offline
      davecotter
      wrote on last edited by
      #3

      i was able to "promote" the QBoxLayout to a widget, and get the same functionality, then i could just hide the widget :D

      1 Reply Last reply
      0
      • Chris KawaC Offline
        Chris KawaC Offline
        Chris Kawa
        Lifetime Qt Champion
        wrote on last edited by
        #2

        Layouts are not visual elements. There's no hiding them because they are not visible. They are only sort of a "children geometry managers" for widgets. So to hide every widget in a layout you either iterate over its elements and hide them individually or enclose them in a parent widget and hide that.

        1 Reply Last reply
        3
        • D Offline
          D Offline
          davecotter
          wrote on last edited by
          #3

          i was able to "promote" the QBoxLayout to a widget, and get the same functionality, then i could just hide the widget :D

          1 Reply Last reply
          0

          • Login

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