I have two questions:
I just told you that linux kernel version 3.8 and onwards support multi-touch functionality. +multitouch +linux now lands here!
To enable two touch gestures: Open "System Settings", go to Mouse and Touchpad, go to the Touchpad tab, then: Uncheck "Enable mouse clicks with touchpad" Disable scrolling or select Edge scrolling.
Touchégg Enables Touchpad Gestures include:Swipe up, down, left, and right with 3 fingers and/or 4 fingers. Pinch in / out with 2, 3, and/or 4 fingers. Tap with 2, 3, 4, and/or 5 fingers.
You can simulate touch events by calling qt_translateRawTouchEvent
directly. (This method is not documented, but it's in qapplication.cpp
and it's exported).
You want to put this at the top of your file:
// forward-declaration of Qt internal function
Q_GUI_EXPORT void qt_translateRawTouchEvent(QWidget *window,
QTouchEvent::DeviceType deviceType,
const QList<QTouchEvent::TouchPoint> &touchPoints);
The function call syntax is :
qt_translateRawTouchEvent(targetWidget, deviceType, points.values());
In your case call this method with (NULL, QTouchEvent::TouchScreen, touchPoints)
where touchPoints
is your list of points being currently touched by the user.
This should work in Qt 4.7 and 4.8 at least, possibly before in Qt 5 but I didn't check that.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With