Results 1 to 5 of 5

Thread: how to disable the maximize button?

  1. #1
    Join Date
    Oct 2008
    Posts
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default how to disable the maximize button?

    Hi all,

    I want to disable the maximize button in my pyqt4 main window.

    I have created a main windows using the qt designer and want to disable the maximize button in it.

    any example, tutorial, code will highly be appreciated..

  2. #2
    Join Date
    Oct 2008
    Posts
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: how to disable the maximize button?

    and of course I use python then for the functions, etc..

    I meant I have created the UI using the qt designer..

  3. #3
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: how to disable the maximize button?

    read more about window flags Qt::WindowFlags

  4. #4
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: how to disable the maximize button?

    example on C++
    Qt Code:
    1. ...
    2. setWindowFlags(windowFlags() ^ Qt::WindowMaximizeButtonHint);
    3. ...
    To copy to clipboard, switch view to plain text mode 

  5. #5
    Join Date
    Feb 2010
    Posts
    20
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default Maximize button disabled but want to remove that.

    Is it possible to remove any one of the maximize or minimize button(not just disabling) ?

    I want to have only a close button and minimize button in my widget.
    So far what I hv achieved is only disabling the maximize button. Can I hide/remove that completely?
    The minimize and maximize button are comming as a pair always. Is there any way to get only one of them like close button?

    Thanks and regards,
    ~netmat

Similar Threads

  1. Disabling the Maximize button in QMainWindow ?
    By sunil.thaha in forum Qt Programming
    Replies: 17
    Last Post: 26th June 2017, 14:31
  2. Disable Close button (X) of a QDialog
    By BrainB0ne in forum Qt Programming
    Replies: 29
    Last Post: 8th December 2009, 18:01
  3. Maximize Window button of Manin Window
    By sabeesh in forum Qt Programming
    Replies: 1
    Last Post: 1st August 2007, 09:20
  4. Disable Checkable Button Question
    By jbpvr in forum Qt Programming
    Replies: 9
    Last Post: 20th March 2007, 18:57
  5. custom maximize button---
    By Naveen in forum Qt Programming
    Replies: 1
    Last Post: 24th February 2006, 14:11

Tags for this Thread

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.