Results 1 to 3 of 3

Thread: does gridlayout really lay out?

  1. #1
    Join Date
    Feb 2006
    Posts
    29
    Thanks
    4
    Thanked 1 Time in 1 Post
    Qt products
    Qt3
    Platforms
    Windows

    Default does gridlayout really lay out?

    hey all,

    it seems to me that grid layout, while putting things in a grid, only spaces things horizontally, not vertically.

    i have 3 sets of labels and their lineEdit counterparts. i put these into a groupbox and added a qgridlayout. when i stretch horizontally, things stretch. when i stretch vertically, they're all stuck at the top and it just adds space below. this is clearly bad behavior. i'm putting it together in designer, is there a bug in designer that's not setting some option??

    thanks!
    lou

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,363
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: does gridlayout really lay out?

    No, it's not a bug. You are not using correct size policies. Change vertical policies of those widgets to MinimumExpanding (Expanding or Minimum should work too) and it should be ok.

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 975 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: does gridlayout really lay out?

    Quote Originally Posted by illuzioner
    when i stretch horizontally, things stretch. when i stretch vertically, they're all stuck at the top and it just adds space below. this is clearly bad behavior.
    It's not that bad, but still it behavior is different from standalone QGridLayout or a QFrame with QGridLayout. This is rather a problem with QGroupBox or QWidgetFactory, than Qt Designer.

Similar Threads

  1. How to drop space in GridLayout ?
    By jackm in forum Qt Tools
    Replies: 2
    Last Post: 3rd October 2008, 03:06
  2. Adding item to GridLayout???
    By Kapil in forum Newbie
    Replies: 23
    Last Post: 7th April 2006, 11:26

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.