Details
-
Type:
Bug
-
Status: Closed
-
Priority:
P1: Critical
-
Resolution: Fixed
-
Affects Version/s: 6.2.0
-
Fix Version/s: 6.2.1
-
Component/s: Widgets: Widgets and Dialogs
-
Labels:None
-
Environment:macOS 10.15.7
-
Platform/s:
-
Commits:60caec953f7
Description
This seems as a very serious regression bug in Qt 6.2.0 on macOS. When I run the following code and when the focus is in the line edit and I press Escape key, nothing happens. No output is printed out.
If I do the same in Qt 5.15.2, text is printed indicating that Escape key has been pressed. When I try the same with Qt 6.2.0 in Windows, it also works well.
Note: The same problem is with QTextEdit and QPlainTextEdit. Other widgets may also be affected, though I have not tested them.
#include <QApplication> #include <QLineEdit> #include <QDebug> class Widget : public QLineEdit { protected: void keyPressEvent(QKeyEvent *event) override { qDebug() << "key pressed" << event; } }; int main(int argc, char *argv[]) { QApplication a(argc, argv); Widget w; w.show(); return a.exec(); }
Attachments
Issue Links
- is duplicated by
-
QTBUG-97565 Escape does not close QDialog
-
- Closed
-