From 1117afb868fdf59371fee456242ee6045a4973fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Str=C3=B8mme?= Date: Thu, 8 Mar 2018 13:29:12 +0100 Subject: Fix visibilty changes of the WebView when it's inside a widget scene This fixes the issue when the the WebView is inside a QQuick scene in a widget application, and the owning widget is hidden. Task-number: QTBUG-66927 Change-Id: I7efdc2ff5c7f0361be7cd10eb33b7307d5f50d95 Reviewed-by: Andy Shaw (cherry picked from commit a499bd8b96715912948fbfe1ae435dc325c9d170) --- src/webview/qquickviewcontroller.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/webview/qquickviewcontroller.cpp b/src/webview/qquickviewcontroller.cpp index 1b6d283..85050d6 100644 --- a/src/webview/qquickviewcontroller.cpp +++ b/src/webview/qquickviewcontroller.cpp @@ -243,6 +243,7 @@ void QQuickViewController::onWindowChanged(QQuickWindow* window) connect(window, &QQuickWindow::yChanged, this, &QQuickViewController::scheduleUpdatePolish); connect(window, &QQuickWindow::sceneGraphInitialized, this, &QQuickViewController::scheduleUpdatePolish); connect(window, &QQuickWindow::sceneGraphInvalidated, this, &QQuickViewController::onSceneGraphInvalidated); + connect(window, &QQuickWindow::visibleChanged, this, [this](bool visible) { m_view->setVisible(visible); }); } // Check if there's an actual window available. -- cgit v1.2.3