PDA

View Full Version : Designer not adjusting size right



Brandybuck
24th July 2006, 05:54
Sometime since in the last few months, the way Designer adjust sizes has changed. In the past, when you right clicked on a form and selected "Lay out -> Adjust Size", it would adjust the size of the form based on the layouts, just as if adjustSize() were called in the application. But now I am seeing that it doesn't work with QGroupBox anymore! It's as if Designer does not recognize the contents of group boxes.

Here is a screenshot from 4.1.4 with two group boxes. Notice how closely spaced the buttons are. I can resize the form so that the group box contents will actually disappear!

Is this a known bug? Does anyone know any workarounds? Thanks...

e8johan
24th July 2006, 10:37
From you screenshots, it looks as if there are no layouts in the actual group boxes...

Brandybuck
24th July 2006, 19:11
From you screenshots, it looks as if there are no layouts in the actual group boxes...

If there are no layouts, then what is scrunching them up? I right click in the group boxes and selected layout in a grid. I am not using separate layouts though. Should I? Does Designer need redundant layouts to get this to work?

Btw, everything works find when actually built and run as an applicaiton. Just not inside Designer.

Brandybuck
25th July 2006, 17:46
Looking at the uic output of the form, setupUi() does indeed create a QGridLayout in the group box. Even though it isn't explicitly shown in Designer, it's still there. Which can be demonstrated simply by displaying a preview.

aMan
25th July 2006, 23:12
is the right image after clicking "Adjust Size" or after resizing by hand?

as a workaround you can try seting a minimum size..

regards..
aman..

Brandybuck
26th July 2006, 03:41
No, the problem is when I do "Adjust Size". I can also resize by hand until all content in the groupbox disappears. Adding a separate layout inside the groupbox does not fix things. It does the same thing if I try using a QFrame instead.

I logged a bug with Trolltech today.

aMan
26th July 2006, 22:19
as a workaround you can try seting a minimum size..


i don't think, it's a bug..
it only doesn't do what you expected..

regards..
aman..

Brandybuck
27th July 2006, 01:05
It doesn't do what the preview and application do. And it doesn't do what 4.1.0 did. So I consider it a bug.

gfunk
29th July 2006, 11:35
I've only used Qt since 4.1.2, and I have not understood what "Adjust Size" in Designer is supposed to do, probably because it has been setting sizes randomly...?!!?!:p