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.

Qt Code:
  1. Item {
  2. id: superrect
  3. anchors.horizontalCenter: myItem.horizontalCenter
  4. anchors.verticalCenter: myItem.verticalCenter
  5. width: myItem.width+60
  6. height: myItem.height+60
  7.  
  8. MouseArea {
  9. id: mouse
  10. anchors.fill: parent
  11. //onEntered: console.log("mouse entered the area")
  12. onExited: {
  13. myItem.opacity= 0;
  14. }
  15. }
  16. }
To copy to clipboard, switch view to plain text mode