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>
This commit is contained in:
Jarkko Koivikko 2021-11-24 12:40:03 +02:00
parent 23f980799d
commit 625cfb6b40

View File

@ -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) {