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 the horizontalLayout?

how to hide the horizontalLayout?

Scheduled Pinned Locked Moved Unsolved General and Desktop
hidelayoutsetvisible
2 Posts 2 Posters 23.4k 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
    ForestPoem
    wrote on last edited by ForestPoem
    #1

    Hi, Guys.

    i want hide the horizontalLayout.

    i can't finding setvisible and hide.

    1 Reply Last reply
    0
    • TheBadgerT Offline
      TheBadgerT Offline
      TheBadger
      wrote on last edited by
      #2

      A layout can not be hidden since they are not widgets and does not have a setVisible() function.

      You have to create a widget that you can hide, that contains the layout and the other widgets that should be hidden, then you hide the widget instead of the layout.

      QWidget* myWidget = new QWidget();
      QHBoxLayout * layout = new QHBoxLayout(myWidget);
      layout->addWidget(new QLabel("Label"));
      myWidget->setVisible(false);
      

      Check out my SpellChecker Plugin for Qt Creator @ https://github.com/CJCombrink/SpellChecker-Plugin

      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