Results 1 to 3 of 3

Thread: fixed size of a top level widget (solved)

  1. #1
    Join Date
    Jul 2006
    Posts
    79
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default fixed size of a top level widget (solved)

    hello,
    i need a fixed size widget. i've set sizePolicy->hSizeType and sizePolicy->vSizeType both to fixed, but the resulting window can be resized. how can i fix that?

    i don't want it to be the minimal size but the size i set.

    i hope it's clear what i want. i've appended the ui file..

    regards..
    aman..
    Attached Files Attached Files
    Last edited by aMan; 22nd July 2006 at 12:04.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: fixed size of a top level widget

    You can't make a widget fixed size from within Designer. Use QWidget::setFixedSize().

  3. #3
    Join Date
    Jul 2006
    Posts
    79
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: fixed size of a top level widget

    Quote Originally Posted by QWidget::setFixedSize()
    Sets both the minimum and maximum sizes of the widget to s, thereby preventing it from ever growing or shrinking.
    i've done this manually as a workaround and it's working..

    thanks for the tip..

    regards..
    aman..

Similar Threads

  1. Pin/Unpin Dock Widget
    By charlesD in forum Newbie
    Replies: 1
    Last Post: 21st June 2006, 06:57
  2. Replies: 4
    Last Post: 24th March 2006, 22:50
  3. Size of a plugin widget in designer
    By high_flyer in forum Qt Programming
    Replies: 4
    Last Post: 28th February 2006, 13:29
  4. Qt 4.1.1 linker warnings
    By Matt Smith in forum Installation and Deployment
    Replies: 0
    Last Post: 26th February 2006, 22:14
  5. [Qt 4.1.0] Split a widget on demand
    By Townk in forum Qt Programming
    Replies: 3
    Last Post: 17th February 2006, 14:16

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.