Results 1 to 7 of 7

Thread: Layouts to ease resizing... [solved]

  1. #1
    Join Date
    Oct 2007
    Posts
    38
    Thanks
    1

    Default Layouts to ease resizing... [solved]

    I have been playing around for a while now with the layouts and I just cannot get my widgets to resize properly along with the main window. If I maximize the thing I just get a bunch of empty space and my widgets remain a constant size.

    Seriously, what do you have to do besides add all your widgets to a layout?

    I've been following along "GUI Programming with QT 4" and it just says add everything to a layout and it will automatically resize...
    Last edited by Dumbledore; 30th October 2007 at 01:33.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Layouts to ease resizing...

    Have you set the top-level layout for the main window? In Qt Designer you have to click the background to select the form and then choose "Lay out in xxx..." from the menu.

  3. #3
    Join Date
    Oct 2007
    Posts
    38
    Thanks
    1

    Default Re: Layouts to ease resizing...

    yes that was it! danke!

  4. #4
    Join Date
    Nov 2007
    Location
    Russia, Moscow
    Posts
    21
    Thanks
    2
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Layouts to ease resizing...

    Quote Originally Posted by jacek View Post
    Have you set the top-level layout for the main window? In Qt Designer you have to click the background to select the form and then choose "Lay out in xxx..." from the menu.
    Sorry, i can't find this option. Could u explain it with a bit more details or make a screenshot? Thx

  5. #5
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Layouts to ease resizing... [solved]

    Here's a screenshot:
    Attached Images Attached Images
    J-P Nurmi

  6. #6
    Join Date
    Feb 2008
    Posts
    6
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Layouts to ease resizing... [solved]

    I've got the same problem.

    Probably the mentioned solution would help me a lot - but unfortunately I can't select any layout in the menu. All the possibilities are greyed out - just "adjust size" is clickable.

    Does anybody have an idea what I can do about that?

    Thanks!

  7. #7
    Join Date
    Feb 2008
    Posts
    6
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Layouts to ease resizing... [solved]

    Ok, trial and error helped: you have to add a widget to your window. After that you can choose a layout by right-click.

    Sorry for bothering you and thanks for the patience.

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.