From 625cfb6b400a88b26b7295f21699c9db28b71483 Mon Sep 17 00:00:00 2001 From: Jarkko Koivikko Date: Wed, 24 Nov 2021 12:40:03 +0200 Subject: 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 --- src/widgets/graphicsview/qgraphicsitem.cpp | 1 + 1 file changed, 1 insertion(+) 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) { -- cgit v1.2.3