PDA

View Full Version : Shape-changing dialog with qt4.1



moe
2nd February 2006, 09:23
Hi

I'm tying to create a shape-changing dialog using the designer but have some trouble getting the dialog to resize.

I have set the sizePolizy in the dialog to fixed and set the layout to vertical. The dialog contains a few frames, some of which might be hidden under some circumstances.
The sizePolizy of the subframes is also set to fixed.


Thanks!

Everall
2nd February 2006, 10:07
Hi

I have set the sizePolizy in the dialog to fixed and set the layout to vertical. The dialog contains a few frames, some of which might be hidden under some circumstances.
The sizePolizy of the subframes is also set to fixed.

Thanks!
Hello,

I guess you want your dialogbox to be of fixed size?
If so don't use the sizPolicy on the widgets, because this makes it possible to stretch them afterwards.
Have a look at :
QLayout::setSizeConstraint(QLayout::setFixedSize)
which sets the dialog at its sizeHint. You have to use code for this.

Hope this helps

moe
2nd February 2006, 10:56
Hello,

Have a look at :
QLayout::setSizeConstraint(QLayout::setFixedSize)
which sets the dialog at its sizeHint. You have to use code for this.

Hope this helps

Thanks! This fixed my problem. I had expected to be able to test this using only the designer and the form preview...

Everall
2nd February 2006, 11:12
I had expected to be able to test this using only the designer and the form preview...
I filed this as a bug some time ago and tasktracker shows now it is planned for QT 4.2 to have this functionality directly in the designer.

Cheers