diff options
author | Christian Strømme <[email protected]> | 2018-03-08 13:29:12 +0100 |
---|---|---|
committer | Christian Stromme <[email protected]> | 2018-03-13 12:02:05 +0000 |
commit | 1117afb868fdf59371fee456242ee6045a4973fb (patch) | |
tree | 25202761981b856e138b05fcbc0bc700143b1cb5 | |
parent | c47248d9a297d0b121c723377b6d44dc9f876603 (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 <[email protected]>
(cherry picked from commit a499bd8b96715912948fbfe1ae435dc325c9d170)
-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. |