Hello guys,
You know the fruit ninja. You can press anywhere and when you touch the fruit, animation plays. And if you know ActionScript 3.0, there is a hitTest to understand if it hit to another. In QML, how can we do this specific movement?
OR:
I want to draw a line: Touch screen, starts to draw a line to finish point which is point that you release touching.
Any idea?
Note: I'm using this following code but it works for only its own MouseArea and it's not what I need actually.
Item {
id: superrect
anchors.horizontalCenter: myItem.horizontalCenter
anchors.verticalCenter: myItem.verticalCenter
width: myItem.width+60
height: myItem.height+60
MouseArea {
id: mouse
anchors.fill: parent
//onEntered: console.log("mouse entered the area")
onExited: {
myItem.opacity= 0;
}
}
}
Item {
id: superrect
anchors.horizontalCenter: myItem.horizontalCenter
anchors.verticalCenter: myItem.verticalCenter
width: myItem.width+60
height: myItem.height+60
MouseArea {
id: mouse
anchors.fill: parent
//onEntered: console.log("mouse entered the area")
onExited: {
myItem.opacity= 0;
}
}
}
To copy to clipboard, switch view to plain text mode
Bookmarks