Results 1 to 4 of 4

Thread: how to disable Alt F4 combination

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

    Default how to disable Alt F4 combination

    hi friends
    i want my Qt application not to close if i press Alt & F4 key.
    i have tried so many options.
    but none is working..
    can anybody help..

  2. #2
    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: how to disable Alt F4 combination

    Have you tried ignoring the close event?
    J-P Nurmi

  3. #3
    Join Date
    Apr 2006
    Location
    Denmark / Norway
    Posts
    67
    Thanks
    3
    Thanked 12 Times in 8 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: how to disable Alt F4 combination

    You can also catch winevents, and stop the keypress from beeing sent further.

    or you can register to recieve native keypresses and "stop" them using win32 api, x11 api or the api for mac, but then you are not cross platform anymore if you don't write the routines for all platforms...

  4. #4
    Join Date
    Aug 2006
    Posts
    163
    Thanks
    12
    Thanked 5 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: how to disable Alt F4 combination

    You must override QWidget::closeEvent()

Similar Threads

  1. How to disable NextButton in QWizard ?
    By litroncn in forum Qt Programming
    Replies: 3
    Last Post: 27th May 2008, 07:05
  2. Disable Checkable Button Question
    By jbpvr in forum Qt Programming
    Replies: 9
    Last Post: 20th March 2007, 17:57
  3. Replies: 1
    Last Post: 9th February 2007, 09:41
  4. Disable Tab Key
    By otortos in forum Newbie
    Replies: 6
    Last Post: 25th March 2006, 16:27

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.