Results 1 to 2 of 2

Thread: How to make QWidget (inside a layout) grow or shrink?

  1. #1
    Join Date
    Dec 2008
    Location
    Istanbul, TURKEY
    Posts
    537
    Qt products
    Qt4
    Platforms
    Windows Android
    Thanks
    14
    Thanked 13 Times in 13 Posts

    Default How to make QWidget (inside a layout) grow or shrink?

    Hi,

    I've the following test ui. I need to make the QWidget(widget_3) at the left side with brown bordered grow or shrink when I resize the overall ui.

    Although I set it's size policies both to "Expanding", the widget's size remains same when I resize the ui.

    If I put a label bigger into this widget whose size is bigger than it, will it grow?

    Thanks in advance.
    Attached Files Attached Files

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

    Default Re: How to make QWidget (inside a layout) grow or shrink?

    You have set the minimumSize & MaximumSize properties, Just reset them to defaults. Refer the attachment
    Attached Files Attached Files
    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.

Similar Threads

  1. Resize widget to layout inside it.
    By mrc_pl in forum Newbie
    Replies: 2
    Last Post: 14th January 2012, 20:22
  2. Replies: 0
    Last Post: 22nd July 2011, 11:31
  3. How to make widget grow outside of its parent widget
    By shakeandbake in forum Qt Programming
    Replies: 2
    Last Post: 9th January 2010, 08:52
  4. How can I set a layout to a dock inside Qt Designer?
    By ricardo in forum Qt Programming
    Replies: 4
    Last Post: 1st May 2009, 10:17
  5. Resizing a QTreeWidget inside a layout
    By bruccutler in forum Qt Programming
    Replies: 11
    Last Post: 27th March 2007, 15:35

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.