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. [SOLVED] How to align buttons in a layout like grid without using specific locations
QtWS25 Last Chance

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

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 840 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.
  • A Offline
    A Offline
    Abin
    wrote on last edited by
    #1

    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
    0
    • podsvirovP Offline
      podsvirovP Offline
      podsvirov
      wrote on last edited by
      #2

      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
      0
      • A Offline
        A Offline
        Abin
        wrote on last edited by
        #3

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

        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