I am currently working on an embedded device running Linux (built from Yocto) on top of an i.MX6 system. I am using Qt 5.3.2 (platform eglfs
) and I make use of TSLIB
for handling my touchscreen.
I am able to successfully calibrate my touchscreen using ts_calibrate
and then I test it with ts_test
and everything is fine: the crosshair pointer on the screen exactly follows my finger.
At this point I run my own Qt application, which actually is a QML-based application. The touch is working (I mean I am able to click on buttons on my screen using my finger) but I have a strange behavior... If I touch the top part of my touchscreen buttons on the bottom part of the touchscreen are being pressed... It's like touch coordinates are translated in the wrong way by Qt application...
It is not a general problem: if I touch the bottom part of the touchscreen then buttons right there are being pressed (correct). But if I touch the upper (top) part of the touchscreen once again buttons on the bottom part of the screen are touched).
What is going up here? Any ideas?
Ok, found a solution on my own: it was due to EVDEV
working concurrently with TSLIB
. My application works fine if I disable EVDEV
setting the environment variable QT_QPA_EGLFS_DISABLE_INPUT=1
and then start my application explicitly specifying -plugin=tslib
on command line.
Actually disabling EVDEV
the detection of mouse is lost and the mouse pointer is always shown on the screen of my touch application. Anyway I could easily get rid of it setting another environment variable QT_QPA_EGLFS_HIDECURSOR=1
.
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