Skip to contentSkip to conversation

Qt5 and touchscreen calibration

Buildroot David Picard 3 participants 4 messages Oct 30, 2015 – Nov 2, 2015

lore
Share & tools
lore
#0 lore raw

Hello,

I got my touchscreen working perfectly with ts_test. Many thanks to Peter Seiderer !

But the thing is that my Qt5 app does not grab the touchscreen properly : x and y axis are switched. I did enable the tslib option under Qt5 in menuconfig. Is there some magic command line option to pass to the application ? I tried this :

$ myapp -platform linuxfb:fb=/dev/fb1 -plugin tslib
ts_open() failed (No such file or directory)
Quoted 1 line
Quoted 1 line
Quoted 1 line

the app shows up, but TS still messed up.

My config :
- Raspberry Pi B+ and Adafruit 2.8" PiTFT w/ cap touch.
- Buildroot 2015.08.1
- Qt5 w/ tslib support enabled (BR2_PACKAGE_QT5BASE_TSLIB=y).

Regards,
David.

#1 lore raw
Quoted 6 lines · David Picard

Hello,

I got my touchscreen working perfectly with ts_test. Many thanks to Peter Seiderer !

Quoted 6 lines

But the thing is that my Qt5 app does not grab the touchscreen properly : x and y axis are switched. I did enable the tslib option under Qt5 in menuconfig. Is there some magic command line option to pass to the application ? I tried this :

$ myapp -platform linuxfb:fb=/dev/fb1 -plugin tslib
ts_open() failed (No such file or directory)

Did you export QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS=/dev/input/event0 (but
replace with the correct device of course)?

Or hang on, for tslib it's TSLIB_TSDEVICE that you have to set.

Regards,
Arnout

Quoted 18 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

the app shows up, but TS still messed up.

My config :
- Raspberry Pi B+ and Adafruit 2.8" PiTFT w/ cap touch.
- Buildroot 2015.08.1
- Qt5 w/ tslib support enabled (BR2_PACKAGE_QT5BASE_TSLIB=y).

Regards,
David.

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#2 lore raw

Hello David, Arnout,

Quoted 9 lines · Arnout Vandecappelle
Quoted 8 lines · David Picard

Hello,

I got my touchscreen working perfectly with ts_test. Many thanks to Peter Seiderer !

But the thing is that my Qt5 app does not grab the touchscreen properly : x and y axis are switched. I did enable the tslib option under Qt5 in menuconfig. Is

The following

	$ QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS='rotate=270' /usr/lib/qt/examples/touch/fingerpaint/fingerpaint -platform 
linuxfb:fb=/dev/fb1

worked for me to get x/y right, see [1] for Qt5 parameters.

Regards,
Peter

[1] http://doc.qt.io/qt-5/embedded-linux.html

Quoted 34 lines
Quoted 4 lines

there some magic command line option to pass to the application ? I tried this :

$ myapp -platform linuxfb:fb=/dev/fb1 -plugin tslib
ts_open() failed (No such file or directory)

Did you export QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS=/dev/input/event0 (but
replace with the correct device of course)?

Or hang on, for tslib it's TSLIB_TSDEVICE that you have to set.

Regards,
Arnout

Quoted 18 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

the app shows up, but TS still messed up.

My config :
- Raspberry Pi B+ and Adafruit 2.8" PiTFT w/ cap touch.
- Buildroot 2015.08.1
- Qt5 w/ tslib support enabled (BR2_PACKAGE_QT5BASE_TSLIB=y).

Regards,
David.

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

#3 lore raw

Hello,

The 'rotate' trick did it.

Thanks,
David.

Le 30/10/2015 21:12, Peter Seiderer a ?crit :

Quoted 61 lines

Hello David, Arnout,

Quoted 9 lines · Arnout Vandecappelle
Quoted 8 lines · David Picard

Hello,

I got my touchscreen working perfectly with ts_test. Many thanks to Peter Seiderer !

But the thing is that my Qt5 app does not grab the touchscreen properly : x and y axis are switched. I did enable the tslib option under Qt5 in menuconfig. Is

The following

	$ QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS='rotate=270' /usr/lib/qt/examples/touch/fingerpaint/fingerpaint -platform
linuxfb:fb=/dev/fb1

worked for me to get x/y right, see [1] for Qt5 parameters.

Regards,
Peter

[1] http://doc.qt.io/qt-5/embedded-linux.html

Quoted 34 lines
Quoted 4 lines

there some magic command line option to pass to the application ? I tried this :

$ myapp -platform linuxfb:fb=/dev/fb1 -plugin tslib
ts_open() failed (No such file or directory)

Did you export QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS=/dev/input/event0 (but
replace with the correct device of course)?

Or hang on, for tslib it's TSLIB_TSDEVICE that you have to set.

Regards,
Arnout

Quoted 18 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

the app shows up, but TS still messed up.

My config :
- Raspberry Pi B+ and Adafruit 2.8" PiTFT w/ cap touch.
- Buildroot 2015.08.1
- Qt5 w/ tslib support enabled (BR2_PACKAGE_QT5BASE_TSLIB=y).

Regards,
David.

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot