qt6-bb10/qtdeclarative/tests/auto/quick/qquickmousearea/data/nestedSendEvent.qml

50 lines
969 B
QML

import QtQuick 2.11
import QtQuick.Window 2.11
import Test 1.0
Window {
id: window
visible: true
width: 200
height: 200
property EventSender sender: EventSender { }
Item {
width: 200
height: 200
MouseArea {
anchors.fill: parent
}
Item {
width: 200
height: 200
Rectangle {
width: 200
height: 100
color: "red"
MouseArea {
anchors.fill: parent
onPressed: sender.sendMouseClick(window, 50, 50)
}
}
Rectangle {
y: 100
width: 200
height: 100
color: "yellow"
MouseArea {
anchors.fill: parent
onPressed: sender.sendMouseClick(window, 50, 50)
}
}
}
}
}