Hi There,
Have a need to propagate MouseArea events to 2 overlapping MouseArea
Elements. Expected the following code to work and pass events across 2 mouse
Areas. What is see is that
- "outerMouseArea" is not passing the single click event to the
"innerMouseArea" though I have set the mouse.accepted = false in
outerMouseArea::onClicked(). How can these Mouse Areas pass events so that
innerMouseArea handles a given type of event while the outerMouseArea handles
the other event.
- Also for every doubleClick I see the onClicked() also being called. If there
a way to only signal doubleClick() event and not a clicked() followed by
dobuleClick()
Rectangle {
height:400
width: 800
color: "red"
Rectangle {
width: 360
height: 360
anchors.centerIn: parent
color: "blue"
Rectangle {
width:80
height: 100
anchors.centerIn: parent
color: "green"
MouseArea {
id: innerMouseArea
anchors.fill: parent
onClicked: {
mouse.accepted = true;
console.log ("single click accepted")
}
}
}
MouseArea {
id:outerMouseArea
anchors.fill: parent
onDoubleClicked: {
console.log ("double click accepted")
mouse.accepted = true;
}
onClicked: {
console.log ("pass on the single click event")
mouse.accepted = false;
}
}
}
}
Regards,
Shiv
_______________________________________________
Qt-qml mailing list
[email protected]
http://lists.qt.nokia.com/mailman/listinfo/qt-qml