There is a little thing that I absolutely need for the application I am developping: I have to be able to drag an object onto another one and at least one of them should notice that they are intersecting. So, I the thing is that one of the items must accept the onEntered signal eventhoug the mouse is pressed form outside.
For example:
import QtQuick 1.0
Rectangle{
id: base
width: 500
height: 500
MouseArea{ //Even without this mousearea I don't get what i want.
anchors.fill: parent
//onPressed:{console.log("big")}
}
Rectangle{
id: t
width: 100
height: 100
color: "red"
MouseArea{
anchors.fill: parent
hoverEnabled: true
onPressed:{console.log("little-press")}
onEntered:{console.log("little-enter")}
drag.target: t
}
}
}
What I want is to press the mouse button outside the red square, and move it without releasing the button. When the mouse passes over the red rectangle, I want the signal onEntered to be emitted. I don’t understang why it is not emited because onEntered should only care about the mouse beeing inside the mouseArea, not about the buttons.
Any idea of how to do it?
Thank you very much.