diff options
author | Jarkko Koivikko <jarkko.koivikko@code-q.fi> | 2021-11-24 12:40:03 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-11-27 03:36:33 +0000 |
commit | 6dda55afeaaf5a6e061e6254ffb3f240130d9bb6 (patch) | |
tree | 1d23729c9798ea97a0b1d299e08f6d22347fae83 | |
parent | 7ec94d27926839f4b5dfa1519c7618b3fd77d219 (diff) |
QGraphicsItem: Update input context after InputMethod event
Without updating the input context, the input method goes out of sync
with the text control.
Fix by updating the input context after InputMethod event.
Fixes: QTBUG-98544
Change-Id: Idfb99bb0f886249cdab923b8dbed96277800c064
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 625cfb6b400a88b26b7295f21699c9db28b71483)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/widgets/graphicsview/qgraphicsitem.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/widgets/graphicsview/qgraphicsitem.cpp b/src/widgets/graphicsview/qgraphicsitem.cpp index 3286e2e12f..9f3679ab79 100644 --- a/src/widgets/graphicsview/qgraphicsitem.cpp +++ b/src/widgets/graphicsview/qgraphicsitem.cpp @@ -10297,6 +10297,7 @@ bool QGraphicsTextItem::sceneEvent(QEvent *event) case QEvent::GraphicsSceneMouseRelease: case QEvent::KeyPress: case QEvent::KeyRelease: + case QEvent::InputMethod: // Reset the focus widget's input context, regardless // of how this item gained or lost focus. if (event->type() == QEvent::FocusIn || event->type() == QEvent::FocusOut) { |