[Qt-qml] GestureAera

marvin42 tourde_a at live.fr
Wed Nov 3 10:08:55 CET 2010


Hi

I try to use GestureAera, but it don't returns value except onTap

Should he choose to add to my project



import Qt.labs.gestures 2.0

    GestureArea {
                          anchors.fill: b1
                          onTap:
                              console.log("tap pos =  
(",gesture.position.x,",",gesture.position.y,")")
                          onTapAndHold:
                              console.log("tap and hold pos =  
(",gesture.position.x,",",gesture.position.y,")")
                          onPan:
                              console.log("pan delta =  
(",gesture.delta.x,",",gesture.delta.y,") acceleration =  
",gesture.acceleration)
                          onPinch:
                              console.log("pinch center =  
(",gesture.centerPoint.x,",",gesture.centerPoint.y,") rotation  
=",gesture.rotationAngle," scale =",gesture.scaleFactor)
                          onSwipe:
                              console.log("swipe angle=",gesture.swipeAngle)
                          onGesture:
                              console.log("gesture hot spot =  
(",gesture.hotSpot.x,",",gesture.hotSpot.y,")")
                   }


-- 
olivier



More information about the Qt-qml mailing list