We are currently developing a graphical Qt application for an embedded system with Vybrid vf610 and we have a hard time trying to get Qt multitouch working.
Our setup is:
Qt (embedded) 4.8.5 with QWS server
Linux - Timesys build for Vybrid vf610 with 3.13 kernel
Touchscreen driver: edt-ft5x06 (upstream version)
We managed to get touchscreen working in Qt using Tslib or LinuxInput drivers, but it registers just one finger at a time and the Qt application only receives mouse events, not touch events or gestures.
The kernel drivers seem to be working properly, touchscreen shows up as /dev/input/eventX and sends proper events of what seems to be Linux multitouch protocol B (see evtest.dump attachment)
For touchscreen testing, we have tried the tslib software (both version 1.0 with Timesys multitouch patch and version 1.1, which should support multitouch by itself). However, the inbuilt tslib test applications (ts_test, ts_print) don't seem to support multitouch by design. Single touch works properly.
In Qt, we have tried several touch, multitouch and gesture examples, but none work with more than one finger. From the source code it seems that none of the mouse drivers for QWS (qmouselinuxinput_qws.cpp, qmouselinuxtp_qws.cpp, qmousetslib_qws.cpp) support sending Qt touch events and there is no dedicated touch driver. Only the generic qlinuxinput.cpp mouse driver plugin seems to support Qt touch events using #define QT_QPA_EXPERIMENTAL_TOUCHEVENT, but doesn't seem to be available for use with QWS anyway.
Is there something what could be done that we are missing? It seems strange that there is documentation about using gestures in Qt and examples but no support for multitouch in drivers. The Internet doesn't offer many clues other than this:
http://www.ptrackapp.com/apclassys-notes/embedded-linux-multitouch/
ant that doesn't look like a proper solution.
Attachments:
evtest.dump - events from kernel touchscreen drivers
qlinuxinput.cpp - LinuxInput driver with experimental Qt touch support. Not available (?) for QWS
qmouselinuxinput_qws.cpp - LinuxInput driver for QWS, no Qt touch event support
qmousetslib_qws.cpp - Tslib driver for QWS, no Qt touch event support
Original Attachment has been moved to: qmouselinuxinput_qws.cpp.zip
Original Attachment has been moved to: evtest.dump.zip
Original Attachment has been moved to: qlinuxinput.cpp.zip
Original Attachment has been moved to: qmousetslib_qws.cpp.zip
已解决! 转到解答。
karinavalencia: No, I didn't notice, thank you for letting me know.
rendy: The hardware is custom made with main components based on the Vybrid Tower, however the display is completely different (Glyn ETMV570G0BDHU with Focaltech FT5406 touchscreen controller). AFAIK the tower board display's driver crtouch_ts doesn't offer multitouch functionality (looks like a work in progress), so the issue can't be replicated on Vybrid tower. But thank you for offering your help.
For reference: I exchanged some emails with Timesys and they recommend moving to Qt5, because it should offer much better multitouch support. Multitouch in Qt4 is "quite incomplete" and requires "a number of manual steps", as described in the ptrackapp.com link in my original post, to start working.
So for now I have to focus on other issues. We have not yet decided whether to move to Qt5 or try to implement multitouch in Qt4.
Hi David,
Allow us some time to review; we've been investigating multi-touch in Qt 5 and it's functionality with tslib. We haven't visited Qt 4.8 with regards to multi-touch yet, but will investigate and report back.
Thank you,
Timesys Support
timesyssupport do you have an update?
Hello,
Not at this time - investigating currently. Qt5 relies on mtdev to provide multi-touch support; that was a later addition, which the 4.8.x series may not have received. karinavalencia is there not a Qt developer who can be of assistance here to clarify/confirm multi-touch availability in Qt 4.8.x?
Regards,
Timesys Support
timesyssupport can you help with this case?