Results 1 to 3 of 3

Thread: How to disable resize in a QWidget

  1. #1
    Join Date
    Jan 2013
    Posts
    43
    Thanks
    27
    Thanked 6 Times in 5 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default How to disable resize in a QWidget

    Hi
    I subclasse a QWidget to myQWidget.
    After resizing it to (x,y) i call show().

    Is it possible to not allowing any further resizing by the user?

    Sorry ... asked to soon
    w.setFixedSize(200,200);

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: How to disable resize in a QWidget

    Probably resize to the sizeHint() instead of a hardcoded size though

    Cheers,
    _

  3. The following user says thank you to anda_skoa for this useful post:

    aguleo (18th February 2013)

  4. #3
    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: How to disable resize in a QWidget

    Or better yet assign a fixed size constraint to the layout of the window.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. The following user says thank you to wysota for this useful post:

    aguleo (18th February 2013)

Similar Threads

  1. How to Disable Scroll Bar of QGraphicsView (or QWidget) ??
    By jiapei100 in forum Qt Programming
    Replies: 5
    Last Post: 6th November 2011, 04:45
  2. Replies: 0
    Last Post: 27th September 2011, 00:14
  3. Disable resize events
    By myrky in forum Qt Programming
    Replies: 7
    Last Post: 26th June 2009, 13:49
  4. Double click resize window disable
    By MarkoSan in forum Qt Programming
    Replies: 3
    Last Post: 13th May 2008, 12:35
  5. How to disable maximum event in QWidget??
    By hesummar in forum Qt Programming
    Replies: 2
    Last Post: 28th October 2006, 14:21

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.