Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import QtQuick 2.12
- import QtQuick.Window 2.12
- Window {
- visible: true
- width: 640
- height: 480
- title: qsTr("Hello World")
- Rectangle {
- anchors.fill: parent
- color: "green"
- MouseArea {
- anchors.fill: parent
- propagateComposedEvents: true
- onClicked: {
- console.log("clicked green")
- mouse.accepted = false
- }
- }
- }
- Rectangle {
- color: "blue"
- width: 50; height: 50
- MouseArea {
- anchors.fill: parent
- propagateComposedEvents: true
- onClicked: {
- console.log("clicked blue")
- mouse.accepted = false
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement