Details
-
Bug
-
Resolution: Done
-
P2: Important
-
None
-
5.3.1
-
None
-
Mac OSX 10.8
Description
I have attached a sample Qt Creator app that exhibits the problem. The app has a global event filter for keyboard. When a dialog is launched with a QTextEdit, the global event filter is not given a chance to process the escape key before the dialog is dismissed. It doesn't get the key at all. On Windows, or in a Dialog that does not have a QTextEdit, the event filter is given its chance to process the escape key.
Debugging on the Mac shows an issue with how key events are being processed in qnsview.mm handleKeyEvent. If you put a break point in the ::reject dialog function you will see this in the call stack and that it seems to be turnign the key event into an close event without giving a chance to process it as a key event by the dialog itself, the widget, or the global event filter.
If you run the attached application on Windows vs Mac you will see that Windows will spit out numerous statements for key pressed to the application output. On the Mac you will only get the debug statement for the reject function.