PDA

View Full Version : How to set de maximum width of a QGridLayout?



cstr
12th March 2012, 21:35
Hi all,

I am thinking in a QGridLayout with 4 QLineEdit horizontaly positioned, but I want the total size of the QGridLayout to be limited to 100, for example.

Is that possible?

I see the following, but do not understand how to deal with it.



quaternionLayout->setSizeConstraint(QLayout::SetMaximumSize());
Thanks in advance.

wysota
12th March 2012, 21:46
Place the layout in the widget and set the maximum width for the widget to 100. However this is usually a bad idea to constrain widget sizes this way.