summaryrefslogtreecommitdiffstats
path: root/examples/video/qmlvideo/qml/qmlvideo/main.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/video/qmlvideo/qml/qmlvideo/main.qml')
-rw-r--r--examples/video/qmlvideo/qml/qmlvideo/main.qml11
1 files changed, 11 insertions, 0 deletions
diff --git a/examples/video/qmlvideo/qml/qmlvideo/main.qml b/examples/video/qmlvideo/qml/qmlvideo/main.qml
index 261a3357b..a2dc29ed6 100644
--- a/examples/video/qmlvideo/qml/qmlvideo/main.qml
+++ b/examples/video/qmlvideo/qml/qmlvideo/main.qml
@@ -69,16 +69,27 @@ Rectangle {
Loader {
id: performanceLoader
+
+ Connections {
+ target: inner
+ onVisibleChanged:
+ if (performanceLoader.item)
+ performanceLoader.item.enabled = !inner.visible
+ ignoreUnknownSignals: true
+ }
+
function init() {
console.log("[qmlvideo] performanceLoader.init logging " + root.perfMonitorsLogging + " visible " + root.perfMonitorsVisible)
var enabled = root.perfMonitorsLogging || root.perfMonitorsVisible
source = enabled ? "../performancemonitor/PerformanceItem.qml" : ""
}
+
onLoaded: {
item.parent = root
item.anchors.fill = root
item.logging = root.perfMonitorsLogging
item.displayed = root.perfMonitorsVisible
+ item.enabled = false
item.init()
}
}