Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.5.0
-
None
-
-
8afe4faf2 (dev), 9ecf68b6d (6.5), 1b5b090a5 (6.6), 92057f7f2 (tqtc/lts-6.2)
Description
I have attached a minimal example to this log to demonstrate the problem. The goal of the example is that the text in the label changes when pressing/releasing the alt key on your keyboard.
This was working in Qt 5.12.6, but not anymore in Qt 6.5.0.
The reason is following change: https://codereview.qt-project.org/c/qt/qtbase/+/311682
In Qt5, a QLineEdit ignores the KeyRelease event and hence it was propagated to its parent (in my example the QDialog). The event was ignored because at the end of the QLineEdit::event() function, QWidget::event(e) was called and the latter function indirectly calls ignore() on the event.
In Qt6, the KeyRelease code was moved to QLineEdit::keyReleaseEvent(), but the code which calls ignore() on the event is missing over here.