I have two rectangles and i want them to send mouseevent to each other while moving mouse with pressed mouse button. See my example
Rectangle {
x: 100
width: 30
height: 30
color: "red"
MouseArea {
hoverEnabled: true
propagateComposedEvents: true
anchors.fill: parent
onMouseXChanged: console.log("red changed" + mouseX)
}
}
Rectangle {
x: 130
width: 30
height: 30
color: "green"
MouseArea {
hoverEnabled: true
propagateComposedEvents: true
anchors.fill: parent
onMouseXChanged: console.log("green changed"+ mouseX)
}
}
Everything works fine when i just move mouse between rectangles. But when i try to pres mouse button and then move - only one rectangle receive events. Is there a way to make it work with button pressed?
P.S. Initial problem, of course, is not with rectangles. Im trying to make combobox work quicker, when you need just one press to open popup and move cursor to item you want to select. But i can find a way to move press event from combobox input to popup. I think example i showed above is the right one to understand the problem.