libts / tslib

Touchscreen access library
GNU Lesser General Public License v2.1
596 stars 290 forks source link

why tslib not working in pyqt5 application? #188

Open sanluku opened 2 years ago

sanluku commented 2 years ago

I can calibrate my touch screen with tslib, and generate pointercal. And i export like this: export TSLIB_TSDEVICE=/dev/input/event4 export TSLIB_CONFFILE=/etc/ts.conf export TSLIB_CALIBFILE=/etc/pointercal

export QT_QPA_EGLFS_TSLIB=1 export QT_QPA_FB_TSLIB=1 export QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS=/dev/input/event4:rotate=0 export QT_QPA_PLATFORM_PLUGIN_PATH=/usr/lib/plugins export QT_QPA_PLATFORM=linuxfb:tty=/dev/fb0 export QT_QPA_GENERIC_PLUGINS=tslib:/dev/input/event4

but in my application, it's still not calibrate, it seems calibrate file didn't work. Did i do something wrong?

merge commented 2 years ago

how does your /etc/ts.conf file look like?

sanluku commented 2 years ago

I didn't make any change. It's look like:

module_raw input module pthres pmin=1 module dejitter delta=100 module linear

merge commented 2 years ago

since qt5 itself only supports the old single-touch api anyways, I suggest running ts_uinput as a daemon, and don't use anything tslib-specific for Qt5, but only configure qt5 to use the input device that ts_uinput creates. That way you become independent from what Qt supports and get multitouch support, with tslib's calibration.