I have a Qt6 app running on the board with the 800x480 display that come with the dev kit. I can rotate the display with a Qt env var QT_QPA_EGLFS_ROTATION=90, but how do I rotate the USB attached touchscreen controller?
Hi~
From our experience, there is a calibration tool provided by the touch vendor that can calibrate the position, or it may have a config file that can set the position of the touch sensor. Please contact the touch vendor to get further support.
The solution I am using consists of using QT to rotate the display output and a udev libinput rule to adjust the touchscreen orientation.
A combination of this for the UI display
export QT_QPA_EGLFS_ROTATION=-90
and this for the touchscreen in /etc/udev/rules.d/touchscreen.rules
SUBSYSTEM==“input”, KERNEL==“event[0-9]*”, ENV{ID_INPUT_TOUCHSCREEN}==“1”, ENV{LIBINPUT_CALIBRATION_MATRIX}=“0 -1 1 1 0 0”
Or this to flip the other way
export QT_QPA_EGLFS_ROTATION=90
and
SUBSYSTEM==“input”, KERNEL==“event[0-9]*”, ENV{ID_INPUT_TOUCHSCREEN}==“1”, ENV{LIBINPUT_CALIBRATION_MATRIX}=“0 1 0 -1 0 1”