diff options
author | Christian Strømme <christian.stromme@qt.io> | 2018-03-08 13:29:12 +0100 |
---|---|---|
committer | Christian Stromme <christian.stromme@qt.io> | 2018-03-12 11:40:01 +0000 |
commit | a499bd8b96715912948fbfe1ae435dc325c9d170 (patch) | |
tree | 0ad087ce192889c214ab2791e8108b894738b5f6 | |
parent | fa66026beafaf00aa549f71d6879320610d0e7e5 (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>
-rw-r--r-- | src/webview/qquickviewcontroller.cpp | 1 |
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. |