PDA

View Full Version : Issue with layout



N3wb
22nd September 2009, 05:15
I have a QVBoxLayout that I'm trying to add two QGridLayouts to. When I add the first QGridLayout, it looks good (note that the "calibrate text" is not part of the QGridLayout, it is added to the QVBoxLayout first):

http://img22.imageshack.us/img22/1744/goodhx.png

But when I add the second QGridLayout, the first one gets all messed up. It's like the first layout is expanding to match the width of the second layout.

http://img198.imageshack.us/img198/8913/messedupkq.png

How can I keep the first layout's width independent of the second layout's?

Thanks for the advice :)

jano_alex_es
22nd September 2009, 09:10
you can use a spacer, forcing your first gridLayout to stay on the right.

Chisum
22nd September 2009, 18:01
I have found it to be easier to design the total window first, and then apply the layouts you wish to use.

Gary