Skip to content

Instantly share code, notes, and snippets.

@caasi
Created August 15, 2017 05:57
Show Gist options
  • Save caasi/8211e00679e432b271c2a1d36281ed93 to your computer and use it in GitHub Desktop.
Save caasi/8211e00679e432b271c2a1d36281ed93 to your computer and use it in GitHub Desktop.
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