How to install Tslib plugin for qt 5.7
-
Hi
I write a QT program for raspberry PI . I use tslib for touch and EGLFS on QT.
I install Tslib on RPI and the ts_calibrate and ts_test is working properly , but there is not any plugin for tslib. I want to apply tslib plugin for rotating touch axis.
How can I install plugin for tslib?Regards,
tictactoe -
Hi,
How did you install Qt on your Pi ?
-
Hi Sgaist
I install it from ubuntu through cross compiling .
Finally , my problem is solved :-)
I read this link
[link text] (https://wiki.qt.io/Native_Build_of_Qt_5.4.1_on_a_Raspberry_Pi)
after installing new Tslib from github I read "Readme.md" from tslib directory and optimize my environment variable like below.export QT_DEBUG_PLUGINS="1" export QT_QPA_EGLFS_DISABLE_INPUT="1" export QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS="/dev/input/event0:rotate=90" export QT_QPA_GENERIC_PLUGINS="evdevtouch:/dev/input/event0"
so the touch is working good. my mistake is at "QT_QPA_GENERIC_PLUGINS " phrase . I use
"QT_QPA_GENERIC_PLUGINS=Tslib"
and getting segmentation fault error.I dont know why evdevtouch is working instead of tslib!!
Do you know about it? -
There is one problem , Although I calibrate the touchscreen via ts_calibrate but I think the qt code does not follow the calibration points . I use this environment variable for tslib.
export TSLIB_FBDEVICE=/dev/fb0 export TSLIB_CONSOLEDEVICE=/dev/tty export TSLIB_TSDEVICE=/dev/input/event0 export TSLIB_CONFFILE=/etc/ts.conf export TSLIB_CALIBFILE=/etc/pointercal export TSLIB_PLUGINDIR=/usr/local/lib/ts
Some button on the different place of the touchscreen is touched so hardly.
What can I do for it? -
AFAIK, if you are using evdev, it won't use tslib to manage input.
-
Cause I'm trying to use tslib instead of evdev, but I think something is wrong with my setup.
When I run
ts_test
I get perfect readings, but when I run a Qt app there's a difference between real touched point and the value read. Close to center of the screen the readings are perfect, but there's an error that accumulates and gets large near the edges. -
What settings are you using ?
-
I have Qt 5.10.1 cross-compiled to Raspberry Pi 3.
Here is my
/etc/environment
file:TSLIB_FBDEVICE=/dev/fb0 TSLIB_TSDEVICE=/dev/input/touchscreen TSLIB_CALIBFILE=/etc/pointercal TSLIB_CONFFILE=/etc/ts.conf TSLIB_PLUGINDIR=/usr/local/lib/ts QT_QPA_EGLFS_TSLIB=1 QT_QPA_EGLFS_HIDECURSOR=1 QT_QPA_EGLFS_PHYSICAL_WIDTH=144 QT_QPA_EGLFS_PHYSICAL_HEIGHT=235
-
Might be a silly question but do you have screen in landscape mode ?
-
How does your system handle that ?
-
@SGaist said in How to install Tslib plugin for qt 5.7:
How does your system handle that ?
Sorry. I didn't understand that question. What exactly do you want to know?
If you want to know how I rotated the screen, it was with the command
./LCD101-1024x600-show 270
.LCD101-1024x600-show
was downloaded from https://github.com/waveshare/LCD-show.