PDA

View Full Version : Widget Margins



qtoptus
21st July 2010, 16:00
When I set the layout of a parent widget, for example to horizontal, the child (contained widgets) are aligned correctly except the margins w.r.t their parent are changed (shifted) differently than what I set in the designer. I tried to change the grid granularity but the problem remains. I need to keep the child widget(s) within specific margins and still maintains the layout policy.

Is there something I need to do? Any setting?

Thanks.

wysota
21st July 2010, 19:09
Please post your ui file and tell us what you mean exactly.

qtoptus
22nd July 2010, 02:26
Here's the buttons how they should be aligned before and after setting their container (tabbed widget) to horizontal layout:

ChrisW67
22nd July 2010, 02:57
You seem to be wanting to adjust the layoutSpacing and layout*Margin properties of the tab layout.

qtoptus
22nd July 2010, 08:06
I've accompanied the UI file. Although I set a horizontal layout for the buttons, I cannot find it on the Designer object list.

wysota
22nd July 2010, 10:20
You are forcing a maximum size of the tab widget so the layout can't expand your widget to make necessary space. Forcing absolute sizes of widgets is in general a BadThing(TM). Remove the maximumSize property from all widgets on the form and everything will work as expected.

qtoptus
23rd July 2010, 16:07
The spacing, or the layout granularity is unaffected. The buttons still have fixed spacing from the boundaries of their container and each other.

I think Designer has missed an option to set granularity of layout...not to mention that the layout I set are inaccessible on the object selector. Weird!

wysota
23rd July 2010, 18:11
The spacing, or the layout granularity is unaffected
Did you modify the values of spacing for the layout?


I think Designer has missed an option to set granularity of layout...
I don't think so.


not to mention that the layout I set are inaccessible on the object selector. Weird!
Sure it is.

qtoptus
24th July 2010, 02:29
Thanks a lot. That worked. :)