This pattern is described in QT documentation, that's why IMHO we should not assume it is wrong.
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.
Bookmarks