Created
August 15, 2017 05:57
-
-
Save caasi/8211e00679e432b271c2a1d36281ed93 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import QtQuick 2.0 | |
Rectangle { | |
width: 360 | |
height: 360 | |
Text { | |
text: qsTr("Hello World") | |
anchors.centerIn: parent | |
} | |
MouseArea { | |
anchors.fill: parent | |
onClicked: { | |
console.log("mouse 0: " + mouse.x + ", " + mouse.y); | |
} | |
} | |
Rectangle { | |
anchors.fill: parent | |
color: "transparent" | |
MouseArea { | |
anchors.fill: parent | |
propagateComposedEvents: true | |
onClicked: { | |
mouse.accepted = false | |
console.log("mouse 1: " + mouse.x + ", " + mouse.y); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment