Swipe Gesture not identified in embedded target
-
Hi,
What are you using as mouse input ? tslib ?
-
Hi Sam,
Sorry for quite late response. Am using tslib.
-
Ok and which version of Qt ?
-
Sam,
Am using Qt version 4.8
-
Swipe requires TouchEvents to come. If you are using tslib and embedded Qt, it generates the QMouseEvents. Since it comes as mouse event, Gestures are not recongnized. You have to do some other mechanism to get the swipe gestures :)
-
Hi Dheerendra,
Thanks for the reply!
As you mentioned, thats the case exactly. I get QMouseEvents. With the mouse events, am able to use them to get Swipe Feature. So, my requirement has met. But, It was out of curiosity, to build the "mechanism" to get QTouchEvents and the swipe gestures :)
Thank you!
--Kumara
-
Sorry if this is a double post (I clicked Submit and all I wrote disappeared).
My situation is nearly the same as yours, kumararajas: embedded, Qt 4.8, tslib, and wanting gestures.
My tslib seems to be installed just fine, as well as the underlying drivers, because ts_print works as expected.
Values look sane, and calibration worked, too.In my case, I want the standard gesture QSwipeGesture from the Qt recognizer, not my own gesture or recognizer.
I added my debug output, and it looks like tslib is simply handing off ordinary mouse events,
so the recognizer is ignoring them. As Dheerendra said, the recognizer wants TouchEvents, like TouchBegin.My question is, can a Qt guru confirm that Qt's tslib support can produce gestures? I really, really hope so -- I need this.
Peter
-
Hi Peter,
That's a nice summary.
Partially, I might try to answer you. But, the experts can correct me.
First of all, tslib - touch screen library, is not from Qt. Its a third party guy who made this library. Can be of many reasons for why "tslib" is so widely used. (One reason I think is, in the initial stage, only "tslib" was present to support touch screen display.
I don't know, what are other libraries that produces touch events.
Also, having resistive touch, there is no fun in look for "pan, zoom, pinch" gestures (In my case).
-
Thanks, kumararajas. I was hoping the QWSTslibMouseHandler class was designed for this, since that is part of Qt and understands tslib communication. But reading through the source, my fear is that the class is intended to dumb down the touch screen, and only emulate a mouse.
-
Donjuedo,
QWSTslibMouseHandler class was there in Qt version 4.1. But, I think, this has been removed in the later versions. (That's what I read from the source "QWSTslibMouseHandler":http://doc.qt.digia.com/4.1/qwstslibmousehandler.html)
If I refer the documentation "Qt Gui":http://qt-project.org/doc/qt-4.8/qtgui.html, i dont see the library that you specified.
I can see QWSMouseHandler, which is meant for different purpose. You can find the documentation here "QWSMouseHandler":http://qt-project.org/doc/qt-4.8/qwsmousehandler.html#details