A TouchArea for QML

For the last few weeks we have been working on a comfortable way to expose raw touch data to QML. The solution we came up with is called TouchArea and is a QML plugin that should be usable from Qt 4.7. The TouchArea is useful whenever you want to track touch points directly in QML, either by using property bindings or trough javascript event functions. This might for example be useful for touch input based games and for recognizing very basic custom gestures directly in javascript.

Now it is your turn to provide us some feedback. We would especially like to receive some feedback about the scoping behavior.
The way it is currently implemented several TouchAreas can be used at the same time. To make TouchAreas mutual exclusive you have to put them into another TouchArea.
Is this the way it should be, or should it rather be the other way round, so that TouchAreas are mutual exclusive by default?

To give it a try you need a recent build of Qt 4.7 and a device that sends touch events. (Touchscreen/Trackpad)
If you want to try it on Linux using multiple touch points then you also need a special version of X [1] and a special Qt version [2]. This will contain a draft implementation of XInput2.1.

The source for the TouchArea can be found at: http://qt.gitorious.org/qt-labs/qml-toucharea

[1] https://wiki.ubuntu.com/Multitouch/XDevelopment
[2] http://qt.gitorious.org/+qt-developers/qt/multipoint-touch/commits/4.7-with-xinput2.1

Please notice that this is a Labs project only. The TouchArea as it is might not become a part of Qt, but using it for your projects should be fine since no modifications in Qt are necessary.


Comments