Results 1 to 17 of 17

Thread: Auto resize Widget to maximum avail. space

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Auto resize Widget to maximum avail. space

    Yes, I was right - you didn't apply a layout to the central widget itself. Instead you had a floating layout, hence the mess in code you provided. Didn't Designer warn you about a floating layout?

    Here is a corrected file.
    Attached Files Attached Files
    Last edited by wysota; 15th April 2008 at 14:17. Reason: Updated attachment

  2. #2
    Join Date
    Feb 2008
    Posts
    157
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Auto resize Widget to maximum avail. space

    Quote Originally Posted by wysota View Post
    Yes, I was right - you didn't apply a layout to the central widget itself. Instead you had a floating layout, hence the mess in code you provided. Didn't Designer warn you about a floating layout?
    What is a floating layout, and what exactly did I wrong? And no the designer never warned me. And I created the dialog as I created every dialog.

    Quote Originally Posted by wysota View Post
    Here is a corrected file.
    If I download and compare with my own one they have not changed. So I cannot see your corrections.

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Auto resize Widget to maximum avail. space

    Quote Originally Posted by pospiech View Post
    What is a floating layout, and what exactly did I wrong?
    A floating layout is a layout without "parent" widget. Take your ui, open it, grab the layout with your mouse and try to move it. If it moves, it's floating.

    And I created the dialog as I created every dialog.
    If so, then you created every dialog incorrectly.

    If I download and compare with my own one they have not changed. So I cannot see your corrections.
    Hmm... sorry, must have forgotten to save the file. Try it again.

  4. #4
    Join Date
    Feb 2008
    Posts
    157
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Auto resize Widget to maximum avail. space

    Quote Originally Posted by wysota View Post
    A floating layout is a layout without "parent" widget. Take your ui, open it, grab the layout with your mouse and try to move it. If it moves, it's floating.
    Well, yes I can move every layout I have ever seen.

    So the question is how to have non floating layouts. What do I have to do in QtDesigner to do it correct?

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Auto resize Widget to maximum avail. space

    Click on the form itself and then on one of the layout buttons, like I did in my ui file.

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
  •  
Qt is a trademark of The Qt Company.