PDA

View Full Version : ListWidget doesn't change size with containing QGroupBox.



davethomaspilot
30th January 2013, 16:37
I have a set of three GroupBoxes in a horizontal splitter. Two of the three size horizontally with their GroupBoxes, but the ListWidget doesn't change size when it's containing GroupBox changes size. The other two GroupBoxes have:

1) six comboboxes in a horizontal layout
2) TableWidget

I attached a screen shot. Note the ListWidget in the "Lineup" groupbox didn't size with the GroupBox.

8659

I tried preferred, minimum expanding, and expanding size policies on the ListWidget, but the horizontal size always seemed fixed.

Should the ListWidget change size with the GroupBox?

Thanks,

Dave Thomas

Santosh Reddy
30th January 2013, 17:02
What is layout set on the "Lineup" groupdbox, my guess is that it dosn't have one.

davethomaspilot
30th January 2013, 17:08
The Lineup groupbox is one of the three groupboxes contained in a horizontal splitter layout.

Lineup, Run Order, and Spit Times group boxes are in a horizontal splitter layout.


Thanks,

Dave Thomas

Santosh Reddy
30th January 2013, 17:16
That does not answer my question.

I am asking what layout is set on "Lineup" groupd box.

I am not asking which layout "Lineup" in put on.


or, try answering this...
ListWidget is what layout?

davethomaspilot
30th January 2013, 18:00
I guess I didn't understand your question.

I thought a layout was something you did to a collection of objects--not a single object like a Group
Box. However, when I clicked on the Lineup GroupBox and set a horizontal layout, it's working like I want!

So, why wasn't that necessary for the other two GroupBoxes? Should a GroupBox always have a layout just for itself, even if it's contained in higher level layout?

Maybe this belongs back in the Newbie Forum.

Thanks,

Dave Thomas

ChrisW67
31st January 2013, 00:57
QGroupBox is a container, and container contents (which may one or many widgets) are arranged by the layout set on the container. The list widget is contained within the group box and controlled by its layout. Have a closer look at the other group boxes and you will find either a layout has been set or they are not resizing how you think they are. The table view on the right looks to be truncated at the right.. I cannot see the edge of the table.