How do I know how many touch points there are at any given time?
I am using some built in Qt multitouch gestures and custom gestures. I can do a drag selection when the screen is touched and I don't want that to happen when there is more than one touch point.
How can I poll the system to find out how many there are? It doesn't matter if there is or isn't a gesture running, I just don't want drag to happen if there is more than one point.
You should look at this:
@Qt::TouchPointPressed 0x01 The touch point is now pressed.
Qt::TouchPointMoved 0x02 The touch point moved.
Qt::TouchPointStationary 0x04 The touch point did not move.
Qt::TouchPointReleased 0x08 The touch point was released.@
Those assume I have a touch event though, correct? I want to know at any given time if there are touch points and how many.
You should use a loop QTimer event to check this
[quote author="vladstelmahovsky" date="1370410991"]read "this":http://qt-project.org/doc/qt-4.8/qtouchevent.html#touchPoints[/quote]
I have already read that and I have a custom gesture to count and store the point total. What I wanted was to not have to use a gesture, but instead just call a API to if possible.
ohh , ok , sorry my misunderstood. I never did that way, I did as I mention before ... not so complex than your ... let's hope someone else can help you ;)
It isn't really that big of an issue since I use the custom gesture. I was just hoping there was one less step for other people to do when using my gesture recognizer.