PDA

View Full Version : how to disable Alt F4 combination



omprakash
13th August 2008, 18:08
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..

jpn
13th August 2008, 18:58
Have you tried ignoring the close event?

luf
15th August 2008, 13:10
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...

Valheru
17th August 2008, 20:18
You must override QWidget::closeEvent()