Add a MouseArea to PreviewImage and prevent interacting with controls below while...
authorMohammed Sameer <msameer@foolab.org>
Mon, 24 Dec 2012 15:10:06 +0000 (17:10 +0200)
committerMohammed Sameer <msameer@foolab.org>
Mon, 24 Dec 2012 15:10:06 +0000 (17:10 +0200)
qml/PreviewImage.qml

index 89cc63a..eee31dd 100644 (file)
@@ -28,11 +28,19 @@ Image {
         id: image
         anchors.fill: parent
         property alias animationRunning: animation.running
+        opacity: 0
+        z: 1
+
+        visible: opacity != 0
 
-        visible: false
         cache: false
         fillMode: Image.PreserveAspectFit
 
+        MouseArea {
+                anchors.fill: parent
+                enabled: parent.visible
+        }
+
         SequentialAnimation {
                 id: animation
                 PauseAnimation { duration: 500; alwaysRunToEnd: true }