PDA

View Full Version : peculiar VBoxLayout Behavior....



nupul
2nd May 2006, 20:19
I am attaching the screen shots to show 3 different types of behaviours achieved when using addStretch(int) member function of QVBoxLayout.

if i call the above function in the constructor:
all widgets occupy bottom part of layout

If i call it after placing all widgets in the layout:
I get an alternating behaviour. i.e
leftmost layout : all buttons pushed to top
middle most layout: all buttons pushed halfway
right most layout : buttons lower than those of middle layout

if I don't call it at all I just get an arbitrary placement...

I have attached the screen shots:

Layout format

Main Widget Window > has 1 QHBoxLayout

QHBoxLayout > has 3 Group Boxes

each group box > has QVBoxLayout

each QVBoxLayout > has pushbuttons

Awaiting your replies.......................soon :crying:

Thanks

Nupul

PS: am not able to attach the 3rd case i.e. no addStretch, due to size constraints...as pics were bigger than allowed i hav zipped them.

munna
2nd May 2006, 20:33
Can you please post you code here and also tell what behaviour you want?

nupul
3rd May 2006, 19:37
hmmm...did you download my snapshots? :D

well the problem got solved though....i set the spacing in a completely different function. But am still not able to figure out the peculiar behaviour!!

Thanks

Nupul