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. Show and Hide Layout Size
Forum Updated to NodeBB v4.3 + New Features

Show and Hide Layout Size

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 3 Posters 510 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.
  • Q Offline
    Q Offline
    Qt.Jo.Ha
    wrote on last edited by
    #1

    hello, i have Layout.

    18180717-9998-4a5d-9e44-7c576705d5b2-image.png

    If i do show in the button hide state, it will look like the picture above. Clicking in this state returns to the normal size. How can I fix it?

    JonBJ 1 Reply Last reply
    0
    • Q Qt.Jo.Ha

      hello, i have Layout.

      18180717-9998-4a5d-9e44-7c576705d5b2-image.png

      If i do show in the button hide state, it will look like the picture above. Clicking in this state returns to the normal size. How can I fix it?

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @Qt-Jo-Ha
      Do you mean that your buttons grow vertically to fit the container layout when you hide one of them, and you'd rather they stayed at a fixed height? Or something else? What class are your buttons?

      1 Reply Last reply
      0
      • Q Offline
        Q Offline
        Qt.Jo.Ha
        wrote on last edited by
        #3

        @JonB

        The size of the button is fixed, and I want the layout to grow to fit the number of visible buttons.

        JonBJ 1 Reply Last reply
        0
        • Q Qt.Jo.Ha

          @JonB

          The size of the button is fixed, and I want the layout to grow to fit the number of visible buttons.

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by JonB
          #4

          @Qt-Jo-Ha
          So what layout are you using and what properties have you set on it? If you have set fixed size on it then it won't do as you want.

          1 Reply Last reply
          0
          • Q Offline
            Q Offline
            Qt.Jo.Ha
            wrote on last edited by
            #5

            @JonB

            i used QVBoxLayout and just set the margins and spacing.

            KroMignonK 1 Reply Last reply
            0
            • Q Qt.Jo.Ha

              @JonB

              i used QVBoxLayout and just set the margins and spacing.

              KroMignonK Offline
              KroMignonK Offline
              KroMignon
              wrote on last edited by
              #6

              @Qt-Jo-Ha said in Show and Hide Layout Size:

              i used QVBoxLayout and just set the margins and spacing.

              It would be easier to help you if you show the QML code. Your drawing is nice but there are many ways to got this result!

              It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

              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