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?
QtWS25 Last Chance

how to hide the horizontalLayout?

Scheduled Pinned Locked Moved Unsolved General and Desktop
hidelayoutsetvisible
2 Posts 2 Posters 22.1k Views
  • 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 7 Dec 2015, 01:05 last edited by ForestPoem 12 Jul 2015, 01:28
    #1

    Hi, Guys.

    i want hide the horizontalLayout.

    i can't finding setvisible and hide.

    1 Reply Last reply
    0
    • T Offline
      T Offline
      TheBadger
      wrote on 7 Dec 2015, 05:28 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

      2/2

      7 Dec 2015, 05:28

      • Login

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