Skip to contentSkip to conversation

New: Touchscreen with (Py)Qt5 should use tslib instead of evdev

Buildroot bugzilla at busybox.net 1 participant 2 messages Feb 5, 2019 – Feb 7, 2019

lore
Share & tools
lore
#0 lore raw

https://bugs.busybox.net/show_bug.cgi?id=11666

Bug ID: 11666
Summary: Touchscreen with (Py)Qt5 should use tslib instead of
evdev
Product: buildroot
Version: 2018.02.9
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P5
Component: Other
Assignee: unassigned at buildroot.uclibc.org
Reporter: tistolz at outlook.de
CC: buildroot at uclibc.org
Target Milestone: ---

Created attachment 7946
--> https://bugs.busybox.net/attachment.cgi?id=7946&action=edit
PyQt5 test application

Hello,

I compiled Qt5 with Tslib support (BR2_PACKAGE_QT5BASE_TSLIB=y), and ts_calibrate and ts_test work properly. I also have a /usr/lib/qt/plugins/generic/libqtslibplugin.so, so the compilation part seems to have worked.

I created a tiny PyQt5 test application (see attachment), which creates 4 buttons. When I run this qt5test.py, the y-axis of the touchscreen appears inverted (x-axis ok).

I've read
http://lists.busybox.net/pipermail/buildroot/2015-November/143571.html and from that it seems that my PyQt5 application uses evdev instead of tslib for input. I can use an extra environment variable:

~> QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS='rotate=180' ./qt5test.py

Now the touchscreen is indeed rotated by 180 degrees, i.e. the x-axis is inverted while the y-axis is ok. Further trials with 'rotate=90' or 'rotate=270' changed the touchscreen orientation accordingly, but none is usable to cancel the inversion of the y-axis.

What strikes me is that the above is an **evdev** option, despite the fact that I want to use Qt5 with **tslib**. I've read about a "-plugin tslib" command-line option, but that changes nothing with my Python script.

So I'm going to need either a way to switch to tslib (preferred), or a QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS value that just flips the y-axis.^

Any help or info will be really appreciated.

Best regards,
Tibor Stolz

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#1 lore raw

[Buildroot] [Bug 11666] Touchscreen with (Py)Qt5 should use tslib instead of evdev

https://bugs.busybox.net/show_bug.cgi?id=11666

Tibor Stolz <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
         Resolution|---                         |WORKSFORME

--- Comment #1 from Tibor Stolz <[email protected]> --- Hello,

I found <http://doc.qt.io/qt-5/embedded-linux.html#touch>, which mentions some more settings to be done by means of environment variables:

~> QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS='inverty' ./qt5test.py

This works for me, I get proper touchscreen input. (Hardware: BeagleBoneBlack with 4D Systems gen4-4DCAPE-43T LCD)

There are two options to enable tslib:

~> QT_QPA_FB_TSLIB=1 ./qt5test.py

This seems to completely disable touchscreen input.

~> QT_QPA_EGLFS_TSLIB=1 ./qt5test.py

This seems to have no effect, i.e. touchscreen input works but is still y-wise inverted.

Since there is no need for tslib in my configuration, as y-wise inversion can be done without it, I declare this bug as RESOLVED WORKSFORME.

Best regards,
Tibor Stolz

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.