Results 1 to 4 of 4

Thread: close button disabling

  1. #1
    Join Date
    Jul 2007
    Posts
    20
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default close button disabling

    dear friends
    i am working on Qt3.3.
    I want to disable the close button as well as minimize button in my main window.
    what is the code i shud write??

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: close button disabling

    Does setWindowFlags(Qt::WindowTitleHint) work for you ??

  3. #3
    Join Date
    Jul 2007
    Posts
    20
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: close button disabling

    Dear friend,
    i am using Qt3.3
    SO i dont thick the above function exists.
    The above piece code worked fine for my Qt4.3. application. But

    I need a function that exists in Qt3.3

    ok bye

  4. #4
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: close button disabling

    Qt doesn't provide a way to disable (ie. gray out) the close button. See this thread for a Windows specific solution: http://www.qtcentre.org/forum/f-qt-p...alog-9348.html. It's for Qt 4 but the same approach should with Qt 3 as well (QWidget::winId() is available in Qt 3 too).
    J-P Nurmi

Similar Threads

  1. How to hide Close Button "X" on Widget ?
    By merry in forum Qt Programming
    Replies: 8
    Last Post: 25th January 2020, 08:03
  2. Disable Close button (X) of a QDialog
    By BrainB0ne in forum Qt Programming
    Replies: 29
    Last Post: 8th December 2009, 17:01
  3. Replies: 5
    Last Post: 21st April 2008, 07:54
  4. Close Button on Modal Widget?
    By vishal.chauhan in forum Qt Programming
    Replies: 5
    Last Post: 18th February 2008, 11:38
  5. Replies: 3
    Last Post: 16th November 2006, 12:24

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.