Touch Input
-
Hi,
I looked at the different classes for input on touch devices and I'm not sure how to use them.
The older one would be MultiPointTouchArea. In the example, they add TouchPoints to it's list. Will this always be the points to work with? Then I could not handle three touch points if I only add two? And are they always used in their order? will my first touch point always be the first in the list ?
A more appropriate way to handle Input seems to be the newer PointerHandler classes. But how would I get the touchpoints from a MultiPointHandler? The is no function to get them, or how does this work here?
Are there any differences between them I need to know?
-
There is nothing exist to get the touch points from MultiPointHandler. Moreover it is not even register with QML. So you can't directly use it. So your choice is MultiPointTouchArea. If you add only two touch points, you need to handle only two. Please look at max and min touch points property.
Also it maintains the order of your touchpoints.
-
Thanks.
If there is no way to get the points from MultiPointHandler it's probably still in developement?
Looks like I didn't read the doc for MultiPointTouchArea properly, did not see the explaination about the point list.
But the MultiPointTouchArea will not distinguish between devices, so it won't be able to tell if it's a finger or stylus, right? If I need that I would have to use it together with a SignlePointHandler for a single stylus input and the other one for multitouch input?
In c++ the TouchPoint class and QTabletEvent supports additional features like tilt. Would it be very difficult to use it in an application with qml gui?
-
Any idea why you would like to distinguish between the finger touch or stylus ? If your idea is identify of single touch or multitouch, touch area will take care of that.