Results 1 to 2 of 2

Thread: Main Window minimal size constraints

  1. #1
    Join Date
    Oct 2008
    Thanked 1 Time in 1 Post
    Qt products
    MacOS X

    Default Main Window minimal size constraints

    The main window in my application embeds several widget within the main window using the QStackedWidget. When the application is run the main window can not be resized below certain size, while there certainly is enough free space to go even narrower.

    Every widget (the main window and the embedded widget) can be resized to, lets say, 100x100 in Qt Designer, while the application can not become smaller than 300x300.

    Where are the size constraints set? How do I remove them?

  2. #2
    Join Date
    May 2010
    Thanked 260 Times in 246 Posts
    Qt products
    MacOS X Unix/X11 Windows Android

    Default Re: Main Window minimal size constraints

    You can use:
    Qt Code:
    1. mainWindow.setMinimumSize(100, 100);
    To copy to clipboard, switch view to plain text mode 

    Are you using layouts? Because from what i have understand might be some layout-ing issue.
    See if you can reproduce the problem in a small compilable example, and attach it here.

Similar Threads

  1. Replies: 9
    Last Post: 16th May 2010, 17:21
  2. Main Window size problem
    By frenk_castle in forum Newbie
    Replies: 2
    Last Post: 20th December 2009, 11:49
  3. Replies: 11
    Last Post: 11th August 2008, 10:14
  4. Applying size constraints to dock widgets
    By fullmetalcoder in forum Qt Programming
    Replies: 4
    Last Post: 23rd October 2007, 14:22
  5. Replies: 15
    Last Post: 23rd March 2007, 17:16

Tags for this Thread


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.