summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJarkko Koivikko <jarkko.koivikko@code-q.fi>2021-11-24 12:40:03 +0200
committerJarkko Koivikko <jarkko.koivikko@code-q.fi>2021-11-27 04:14:15 +0200
commit625cfb6b400a88b26b7295f21699c9db28b71483 (patch)
tree7f3e64448aef1db13c9eed0eafa07f799b0f8117
parent23f980799d03f1522b6c7f87c2018566bcb6c996 (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 Pick-to: 6.2 5.15 Change-Id: Idfb99bb0f886249cdab923b8dbed96277800c064 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
-rw-r--r--src/widgets/graphicsview/qgraphicsitem.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/widgets/graphicsview/qgraphicsitem.cpp b/src/widgets/graphicsview/qgraphicsitem.cpp
index 69a331a563..606244dd3c 100644
--- a/src/widgets/graphicsview/qgraphicsitem.cpp
+++ b/src/widgets/graphicsview/qgraphicsitem.cpp
@@ -10093,6 +10093,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) {