PDA

View Full Version : does gridlayout really lay out?



illuzioner
26th February 2006, 01:39
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

wysota
26th February 2006, 01:42
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.

jacek
26th February 2006, 01:57
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.