PDA

View Full Version : Setting all QGridLayout columns to have the same width



Malk
12th August 2010, 15:48
Hello everyone.

I'm having a little problem trying to make all columns of a QGridLayout to have the width of the largest element in the grid.
I believe I can use the setColumnMinimunWidth method for setting the width of the columns, but how can I get the width of the largest element in the grid? I've been looking at the documentation and examples on the internet but couldn't find anything so far.

Thanks in advance!

franz
13th August 2010, 07:28
Try QGridLayout::setColumnStretch() (http://doc.trolltech.com/latest/qgridlayout.html#setColumnStretch).