Results 1 to 3 of 3

Thread: Problems with QGridLayout

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,348
    Qt products
    Qt5
    Platforms
    Windows
    Thanks
    318
    Thanked 872 Times in 859 Posts

    Default Re: Problems with QGridLayout

    I think the problem is that each of the hbox layouts scales its contents independently of all of the others, so when you put them into the grid, nothing lines up.

    I would get rid of all of the horizontal layouts and simply put each item separately into a grid cell. This will guarantee that each column of the grid resizes to the size of the largest item in each column and that all of the columns will align vertically. You can play around with the stretch factors or maximum widths for each column to get them to stretch the way you want.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  2. The following user says thank you to d_stranz for this useful post:

    franco.amato (13th November 2021)

Similar Threads

  1. I have problems with QListWidget and QGridLayout
    By franco.amato in forum Qt Programming
    Replies: 3
    Last Post: 30th August 2021, 07:37
  2. Having resize problems with QGridLayout
    By di_zou in forum Newbie
    Replies: 0
    Last Post: 10th December 2009, 16:49
  3. QGridLayOut
    By Rakesh_Kumar in forum Qt Programming
    Replies: 2
    Last Post: 9th January 2009, 05:49
  4. Delete a QGridLayout and New QGridLayout at runtime
    By sabeesh in forum Qt Programming
    Replies: 1
    Last Post: 5th November 2007, 14:01
  5. Qt 3.3 QGridLayout
    By ToddAtWSU in forum Qt Programming
    Replies: 2
    Last Post: 23rd February 2007, 18:40

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.