Unsolved Separating x/y components of pinch gesture
-
Hi guys.
Making a mobile application where the user will be interacting with a graph (zooming, scaling).
I thought the most intuitive way to do this would be through a QPinchGesture, but have found that it does not allow the x/y components to be considered separately natively.Does anyone know a class that can handle them separately, or alternatively is there a simple way to get around this?
Could I capture the x/y positions from the individual QGestureEvents (or QEvents) and use that to determine whether the user is trying to scale in x or y?Thanks,
~Chris -
@espocjo Why do you need it? Do you want to resize only one axis? This would change the aspect ratio.
-
const QList< QTouchEvent::TouchPoint > &QTouchEvent::touchPoints() const
http://doc.qt.io/qt-5/qtouchevent.html#touchPointsYou get a list of touch points(fingers touching the screen) and you can check touchpoint x/y by calling pos() method.
-
@jsulm said in Separating x/y components of pinch gesture:
@espocjo Why do you need it? Do you want to resize only one axis? This would change the aspect ratio.
It's for plotting. You want to be able to change the aspect ratio. :)
@Eligijus said in Separating x/y components of pinch gesture:
const QList< QTouchEvent::TouchPoint > &QTouchEvent::touchPoints() const
http://doc.qt.io/qt-5/qtouchevent.html#touchPointsYou get a list of touch points(fingers touching the screen) and you can check touchpoint x/y by calling pos() method.
Thanks. I'll look into that this afternoon.