View Full Version : Form resizes ok in Designer, not in my test app.

28th August 2007, 18:17
I am out of now officially out ideas as to how to proceed.

This form operates and resizes exactly how I want it when viewed in
QT Designer.

In a test app I create a Layout and place this form on it.

m_Layout = new QHBoxLayout;
m_PolMonitorForm = new PolMonitorProperty(this);

The groupBox into which I am placing it has a sizePolicy
of Expanding,Expanding and a minimum size of 650,400.

The control dialogs should remain at the left with the tree groupbox
growing and expanding as the app is resized.

Instead the control dialogs shift to the right and the tree groupbox
resizes only in the vertical direction, with everything more or less
staying in the center of the groupbox.

What I am missing here!

I've attached images from QT Designer and my test app as well as
my ui file, although as it contains a custom control you may not be
able to see it.


30th August 2007, 07:14
I can't try it out right now because i haven't the Qt Designer installed, but i think that what you need is a QSplitter ( http://doc.trolltech.com/4.3/designer-editing-mode.html#splitter-layouts ).

Another option would be a QDockWidget ( http://doc.trolltech.com/4.3/qdockwidget.html ) if you are using a QMainWindow. Both are available from the designer.
edit: If you are using a QDockWidget, it would probably be helpful to make it dockable in the properties..

30th August 2007, 14:30
Could you post a compilable example? What are "control dialogs" and what is the "tree groupbox"? You are using promoted widgets, so the ui you attached is practically useless...

From what I see you should set the horizontal size policy of the tree groupbox to expanding and it's content's size policy to expanding as well.