Results 1 to 6 of 6

Thread: ListWidget doesn't change size with containing QGroupBox.

  1. #1
    Join Date
    Jun 2012
    Posts
    219
    Thanks
    28
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default ListWidget doesn't change size with containing QGroupBox.

    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.

    qt.jpg

    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

  2. #2
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: ListWidget doesn't change size with containing QGroupBox.

    What is layout set on the "Lineup" groupdbox, my guess is that it dosn't have one.
    When you know how to do it then you may do it wrong.
    When you don't know how to do it then it is not that you may do it wrong but you may not do it right.

  3. #3
    Join Date
    Jun 2012
    Posts
    219
    Thanks
    28
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: ListWidget doesn't change size with containing QGroupBox.

    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

  4. #4
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: ListWidget doesn't change size with containing QGroupBox.

    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?
    When you know how to do it then you may do it wrong.
    When you don't know how to do it then it is not that you may do it wrong but you may not do it right.

  5. #5
    Join Date
    Jun 2012
    Posts
    219
    Thanks
    28
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: ListWidget doesn't change size with containing QGroupBox.

    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

  6. #6
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: ListWidget doesn't change size with containing QGroupBox.

    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.
    Last edited by ChrisW67; 31st January 2013 at 00:01.

Similar Threads

  1. QGroupBox size problem
    By MarkoSan in forum Newbie
    Replies: 2
    Last Post: 22nd November 2009, 18:44
  2. QGroupBox visibility change trapping
    By lurky in forum Newbie
    Replies: 2
    Last Post: 10th September 2009, 09:07
  3. Minimum QGroupBox size
    By klnusbaum in forum Qt Programming
    Replies: 3
    Last Post: 19th June 2008, 17:22
  4. Replies: 2
    Last Post: 21st May 2007, 21:12
  5. how to change QGroupBox frame color? (Qt4)
    By high_flyer in forum Qt Programming
    Replies: 7
    Last Post: 9th May 2006, 13:48

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.