Results 1 to 5 of 5

Thread: Resizing a form parsed in another form

  1. #1
    Join Date
    Jan 2013
    Posts
    25
    Qt products
    Qt4
    Platforms
    Windows

    Default Resizing a form parsed in another form

    I hope i can explain this issue correctly, so bear with me.

    I have a main form that contains a frame. This frame contains a listwidget, which exists on a separate .ui file. The listitems are another .ui file.
    The listitems are being parsed into the listwidget, and the listwidget into the frame of the main .ui

    See this illustration of what i mean:
    situation.png

    Now all files have a layout and correctly resize with their window on their own. However, when the listwidget is being parsed into the main form, the listwidget will have the same width/height as set in the designer and will not expand to the frame of the main form.

    See illustration:
    result.jpg

    At first i thought it was a size policy that was incorrect, but every option does not give the desired result.
    Anyone knows what i can do so the listwidget will expand to the frame?

    I know that if they listwidget is placed directly into the main view with QT Designer, it will work, but the controller won't allow this.

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Resizing a form parsed in another form

    Sounds like the frame is missing its layout.

    Cheers,
    _

  3. #3
    Join Date
    Jan 2013
    Posts
    25
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Resizing a form parsed in another form

    Quote Originally Posted by anda_skoa View Post
    Sounds like the frame is missing its layout.

    Cheers,
    _
    Nope, the frame has a vertical layout.
    If i put a listwidget in the frame in designer, it works fine. But the face that the listwidget is parsed from another .ui file, it doesn't work.

  4. #4
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Resizing a form parsed in another form

    Did you add the widget to the layout?

    Can you show the code that creates the list view instance and adds it to the frame?

    Cheers,
    _

  5. #5
    Join Date
    Jan 2013
    Posts
    25
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Resizing a form parsed in another form

    -edit-

    -Disregard that-

    I'll see if i can create a mini project that has the issue.
    Last edited by Nyte; 14th July 2014 at 14:06.

Similar Threads

  1. Replies: 3
    Last Post: 18th July 2013, 04:12
  2. Replies: 7
    Last Post: 23rd May 2012, 12:00
  3. Resizing dialog with form layout
    By elizabeth.h1 in forum Qt Programming
    Replies: 2
    Last Post: 30th August 2009, 19:58
  4. Layouts and form resizing
    By Chisum in forum Newbie
    Replies: 1
    Last Post: 2nd April 2009, 00:58
  5. form not auto resizing
    By quickNitin in forum Newbie
    Replies: 5
    Last Post: 7th June 2007, 10:00

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.