Quote Originally Posted by Spitfire View Post
You're doing it wrong.

You're using QCoreApplication:rocessEvents() to keep your UI responsive while doing some lenghty tasks.
This pattern is described in QT documentation, that's why IMHO we should not assume it is wrong.

Quote Originally Posted by Spitfire View Post
This way even if the event is delivered it will be discarded as long as dialog is there.
The problem is that it is not delivered there, neither to waitDlg. It is created much later after actual key press happened and it is delivered to message_box.

Unfortunately both of you don't seem to notice problem I described. I need a way of discarding keys that were pressed while application was switching dialogs.