Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    [SOLVED] How to align buttons in a layout like grid without using specific locations

    General and Desktop
    2
    3
    734
    Loading More Posts
    • 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.
    • A
      Abin last edited by

      Hi,

      Is there a way to set buttons on to the layout depending on the parent widget size.

      say, I have 10 buttons and parent widget can accommodate only 5 in one row, the rest buttons should appear in next row.

      Even if I use grid layout without specifying locations it will be in a single row...

      1 Reply Last reply Reply Quote 0
      • podsvirov
        podsvirov last edited by

        Perhaps this example will help you "Flow Layout Example...":http://qt-project.org/doc/qt-5/qtwidgets-layouts-flowlayout-example.html

        1 Reply Last reply Reply Quote 0
        • A
          Abin last edited by

          thanks.. seems promising, ill try this out..

          1 Reply Last reply Reply Quote 0
          • First post
            Last post