From 9bfa722bc0b67e01f35d78e1165602e174ae3b02 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Mon, 31 Aug 2020 11:55:17 +0200 Subject: QQuickWidget: Propagate focusObjectChanged When the offscreen window focuses an item, make sure we set keyboard focus to the QQuickWidget in the widget chain. [ChangeLog][QQuickWidget] Fixed an issue where virtual keyboards and other input methods would not react to input fields inside a QQuickWidget. Fixes: QTBUG-61475 Pick-to: 5.15 Change-Id: Ice2905a33ab0f4669622367ddae2c0ed3a1f841c Reviewed-by: Laszlo Agocs --- src/quickwidgets/qquickwidget.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/quickwidgets/qquickwidget.cpp') diff --git a/src/quickwidgets/qquickwidget.cpp b/src/quickwidgets/qquickwidget.cpp index 1c9fc3ca69..f384058523 100644 --- a/src/quickwidgets/qquickwidget.cpp +++ b/src/quickwidgets/qquickwidget.cpp @@ -117,6 +117,7 @@ void QQuickWidgetPrivate::initOffscreenWindow() QWidget::connect(offscreenWindow, SIGNAL(sceneGraphInitialized()), q, SLOT(createFramebufferObject())); QWidget::connect(offscreenWindow, SIGNAL(sceneGraphInvalidated()), q, SLOT(destroyFramebufferObject())); + QWidget::connect(offscreenWindow, SIGNAL(focusObjectChanged()), q, SLOT(setFocus())); } void QQuickWidgetPrivate::init(QQmlEngine* e) -- cgit v1.2.3