Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.5.0
-
None
Description
In the QDialog documentation, one reads:
- in the escape key section:
If the user presses the Esc key in a dialog, QDialog::reject() will be called. This will cause the window to close: The close event cannot be ignored.
- in the reject() section:
Hides the modal dialog and sets the result code to Rejected.
The text in the section about the escape key suggests that closeEvent() is called when pressing the Esc key. Yet, the reject() documentation says clearly that the QDialog is hidden and thus that the closeEvent() is not called.
I have tested and confirm that closeEvent() is not called when the Esc key is pressed. Either this is a bug and should be fixed, or at least the documentation should be rewritten so that the user does not think that closeEvent() is called when the Esc key is pressed.
Attachments
Issue Links
- relates to
-
QTBUG-53286 Consistent QWindow close event behavior
- Open