nerves-web-kiosk / webengine_kiosk

Qt WebEngine-based kiosk
Other
75 stars 14 forks source link

Touch input rotation #27

Open harmon25 opened 4 years ago

harmon25 commented 4 years ago

Rotating the image via config.txt seems to work best, but for input the following QT environment variable is required.

QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS

Here is an example of setting with System.put_env/2 before launching the webengine.

System.put_env("QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS", "/dev/input/event0:rotate=270")

Here is a link to relevant section of the QT documentation:

https://doc.qt.io/qt-5/inputs-linux-device.html#touch