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.
Attachments
For Gerrit Dashboard: QTBUG-114654 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
486427,2 | QLineEdit: ignore key release events | dev | qt/qtbase | Status: MERGED | +2 | 0 |
486598,2 | QLineEdit: ignore key release events | 6.6 | qt/qtbase | Status: MERGED | +2 | 0 |
486599,2 | QLineEdit: ignore key release events | 6.5 | qt/qtbase | Status: MERGED | +2 | 0 |
502248,2 | QLineEdit: ignore key release events | tqtc/lts-6.2 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |