PDA

View Full Version : Designer: Spacer doesn't do what I want...



jochen_r
13th January 2006, 11:59
Hi,

I have a problem with the Qt designer.

I have a widget stack, inside the widget stack I have a few elemets. These elements are placed nicly relativly to themselves. I have arranged these using "layout vertically" and "layout horizontially". Around this "box of elements" I have placed four spacers because I want these elements in the middle of the screen. But they aren't! They are place exactly where I drew them and the main window is as large as I drew it (I expected it to resize to the minimum needed size). Any idea what went wrong?

Regards,
Jochen

wysota
13th January 2006, 12:06
You have to apply a layout to the form itself too. Deselect all the widgets by clicking on the form and then press one of the layout buttons.

GreyGeek
18th January 2006, 21:52
You have to apply a layout to the form itself too. Deselect all the widgets by clicking on the form and then press one of the layout buttons.

And if doing what wysota suggests gives you a pile of jumbled up controls then you don't have your controls layed out sufficiently.
What usually happens is that you'll group controls with horizontal layouts until you get several horizontal layouts in a vertical column.
Then you add a final vertical layout to which all the horizontal layouts have been added. That's when you click on an empty portion of your fom and then click the horizontal layout option one more time.

sunil.thaha
19th January 2006, 06:23
Could u give the form and an Image Showing How u would like it to be ?