summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian Strømme <christian.stromme@qt.io>2018-03-08 13:29:12 +0100
committerChristian Stromme <christian.stromme@qt.io>2018-03-12 11:40:01 +0000
commita499bd8b96715912948fbfe1ae435dc325c9d170 (patch)
tree0ad087ce192889c214ab2791e8108b894738b5f6 /src
parentfa66026beafaf00aa549f71d6879320610d0e7e5 (diff)
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 <andy.shaw@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/webview/qquickviewcontroller.cpp1
1 files changed, 1 insertions, 0 deletions
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.