Results 1 to 3 of 3

Thread: peculiar VBoxLayout Behavior....

  1. #1
    Join Date
    Mar 2006
    Posts
    172
    Thanks
    30
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Exclamation peculiar VBoxLayout Behavior....

    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

    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.
    Attached Files Attached Files

  2. #2
    Join Date
    Jan 2006
    Posts
    667
    Thanks
    10
    Thanked 80 Times in 74 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: peculiar VBoxLayout Behavior....

    Can you please post you code here and also tell what behaviour you want?

  3. #3
    Join Date
    Mar 2006
    Posts
    172
    Thanks
    30
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Talking Re: peculiar VBoxLayout Behavior....

    hmmm...did you download my snapshots?

    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

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.