PDA

View Full Version : How to change the QLayout's prefered size?



aaron
3rd April 2009, 03:26
Hi all,
Good morning!
In my programe, I define a QMainWindow, It includes a sub-window. The sub-window contains a QListView, QFrame, QHBoxLayout ,two buttons and a QDockWidget.
My request is the sub-window's height is not too big when mainwindow showing, and user can stretch its height. But the real result is the sub-window's height is almost half height of the whole mainwindow, it is very ugly. The manual said, the QWidget will present by QLayout's prefered size when it includes a QLayout.
I have used a lot of ways said in manual, but I did not find a way to disable the property of QLayout , so please help!
Thanks a lot!