Hi All,
I am using Qt 4.3.3 on my Mac.
I have a dialog and when I press the Esc key the dialog get closed.
So how should I avoid this? that is the dialog should not closed on pressing Esc key.
Thanks.
Hi All,
I am using Qt 4.3.3 on my Mac.
I have a dialog and when I press the Esc key the dialog get closed.
So how should I avoid this? that is the dialog should not closed on pressing Esc key.
Thanks.
what did you set Qt::WindowFlags for that dialog ,check it ....................
setWindowFlags(Qt:ialog | Qt::WindowSystemMenuHint | Qt::WindowMinimizeButtonHint);
Simply set its window Flag Qt::Window, I hope it help you,
you can also prevent your escape key event by explicitly change its event using keyPressEevnt(QKeyEvent *event).........
Thanks for the reply.
Actually it does not make any difference when I use Qt::Windows flag but I will try out second method of changing the keyPressEvent.
Yes the key event method does work.
Thanks.
Bookmarks