PDA

View Full Version : Resizing a form parsed in another form



Nyte
10th July 2014, 13:38
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:
10511

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:
10512

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.

anda_skoa
10th July 2014, 14:33
Sounds like the frame is missing its layout.

Cheers,
_

Nyte
10th July 2014, 16:49
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.

anda_skoa
10th July 2014, 19:41
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,
_

Nyte
14th July 2014, 14:00
-edit-

-Disregard that-

I'll see if i can create a mini project that has the issue.