Skip to content

Instantly share code, notes, and snippets.

@kimmoli

kimmoli/Pinchtest.qml

Last active Aug 29, 2015
Embed
What would you like to do?
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