Results 1 to 4 of 4

Thread: listWidget resize

  1. #1
    Join Date
    Jun 2007
    Location
    Opelika, AL, USA
    Posts
    5
    Qt products
    Qt4
    Platforms
    Windows

    Question listWidget resize

    Hi all,

    I have a simple dialog I am trying to create in QtDesigner. What I have so far is a ToolBox and a StackedWidget layed out in a horizontal layout. As I resize the dialog, the ToolBox expands to a maximum width and stops, while the StackedWidget continues to grow to fill the remaining horizontal space. This all works as I had hoped.

    On one page of the StackedWidget, I have added a single ListWidget. My wish is for the ListWidget on this page to shrink/expand to always fill its page of the StackedWidget. I have tried a good many combinations of settings (SizePolicy/Geometry) and found none that will get the ListWidget to "keep up" with the size of the StackedWidget page it is a child of.

    Any help would be greatly appreciated.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: listWidget resize

    It looks like you forgot to set the layout for that stacked widget's page. Just click on the page and then choose one of the "Lay Out xxx" options from the "Form" menu.

  3. #3
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: listWidget resize

    Set a layout -vertical or horizontal - to a widget and add the list widget to this layout. Then add the first widget to the stacked widget.

    Regards

  4. #4
    Join Date
    Jun 2007
    Location
    Opelika, AL, USA
    Posts
    5
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: listWidget resize

    Quote Originally Posted by jacek View Post
    It looks like you forgot to set the layout for that stacked widget's page. Just click on the page and then choose one of the "Lay Out xxx" options from the "Form" menu.
    Thanks - that did it!

Similar Threads

  1. Resize QWidget in QMainWindow
    By aamer4yu in forum Qt Programming
    Replies: 1
    Last Post: 8th March 2007, 12:16
  2. Custom Shape Widget (resize)
    By PiXeL16 in forum Qt Programming
    Replies: 7
    Last Post: 12th February 2007, 07:00
  3. How to resize window with pushbutton
    By kaydknight in forum Newbie
    Replies: 2
    Last Post: 13th January 2007, 12:17
  4. postponing resize event
    By Honestmath in forum Qt Programming
    Replies: 11
    Last Post: 26th February 2006, 00:32
  5. How to get a QDockWidget to auto resize?
    By bitChanger in forum Qt Programming
    Replies: 4
    Last Post: 6th January 2006, 16:10

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.