Skip to content

Instantly share code, notes, and snippets.

@kimmoli
Last active August 29, 2015 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kimmoli/d538d61ab5af41010fa3 to your computer and use it in GitHub Desktop.
Save kimmoli/d538d61ab5af41010fa3 to your computer and use it in GitHub Desktop.
Test
Item
{
Rectangle
{
id: rect
width: 200; height: 200
color: "red"
y: 280
x: 30
onXChanged: console.log(x + " " + y)
PinchArea
{
anchors.fill: parent
pinch.target: rect
pinch.minimumScale: 0.33
pinch.maximumScale: 2.5
pinch.minimumRotation: -360
pinch.maximumRotation: 360
MouseArea
{
anchors.fill: parent
drag.target: rect
drag.axis: Drag.XAndYAxis
drag.minimumX: 30
drag.maximumX: 460
drag.minimumY: 30
drag.maximumY: 880
onClicked: console.log("clicked")
onPressAndHold: console.log("looong")
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment