Qt 5.10.1 EGLFS libinput Touchscreen rotation
-
Hi,
I try to do my first development on Rapsberri PI 3 and Qt.
I use Qt 5.10.1 with cross compilation for Raspberry 3
I have a 7" LCD with USB touchscreen rotate a 90°.I found the solution to rotate the screen with config.txt adding :
display_hdmi_rotate=3and the touchscreen is rotated with adding call a batch script in
~/.config/lxsession/LXDE-pi/autostrart
the script is :
xinput set-prop 'FocalTech Lab FTxxxx MultiTouch' 'Coordinate Transformation Matrix' 0 -1 1 1 0 0 0 0 1So the touchscreen is working in startx
My problem is with programs in Qt using EGLFS and libinput. I can not rotate my touchscreen.
I read a lot a post talking about wayland, tslib, ts_calibrate, evdev.... But I think it is for old development.
I am pretty sure there is a simple solution for nowadays.Sébastien
-
@chtioub
Have a look at:
https://doc.qt.io/qt-5/embedded-linux.htmlSince you have a multitouch panel it seems, you can use the
evdevtouch
plugin:export QT_QPA_GENERIC_PLUGINS=evdevtouch:/dev/input/touchscreen
Replace
/dev/input/touchscreen
by/dev/input/eventX
with the correct value forX
if you haven't setup audev
rule yet.The same with rotation:
export QT_QPA_GENERIC_PLUGINS=evdevtouch:/dev/input/touchscreen:rotate=90
-
@Diracsbracket said in Qt 5.10.1 EGLFS libinput Touchscreen rotation:
QT_QPA_GENERIC_PLUGINS
ouch !
3 months to turn around, and with 3 lines, you solve my problem !
Many thanks.Now I would like to understand a little why I cannot use libinput as it is the native driver for ELGFS.
This are no solution with libinput ?
I trough evdev was an old solution -
Hi,
Well, evdevtouch plugin seem to be completely buggy.
The rotation woks very well but afin 1 to 10 secondes, the touch does not woks anymore.
Even with example programs.I have this information :
TouchPointPressed without previous release event QQuickEventPoint(accepted:false state:Pressed scenePos:QPointF(249.631,798.957) id:2000002 timeHeld:0)I have to reset the application to work.
Is there any solution to workaround this bug or a solution with libinput ?