[Qt-interest] Layout with fixed percentage width

Hendrik Fuß fuss at molecular-machines.com
Mon Apr 19 12:52:32 CEST 2010


Okay, I can now answer this question myself:


	I'd like to have a layout with four columns of *equal* width, that is each should occupy 25% of the full width. Is that possible with QHBoxLayout, QGridLayout or similar?

I managed to do so by setting the horizontal size policy of the four child widgets to "Ignored". This made them obtain equal amounts of space in the layout.
 
Not sure if this is the best way to do it, but it solved my problem.
 
cheers
Hendrik
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100419/2a3596d0/attachment.html 


More information about the Qt-interest-old mailing list