Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Qt embedded dispaly and touch rotation on RPi3
MrEliptik last edited by
I've succesfully installed and tested QT5 on my RPi3 with QWidget apps. I originally wanted to rotate the screen 270°. To do that, I added : display_rotate=3 in /boot/config.txt. That rotates the display but not the touch inputs. That's fine because using environment variable tells Qt that my screen is rotated.
I've used the following and it was working fine :
export QT_QPA_EGLFS_ WIDTH=480
With that configuration, the screen works fine at 270°, with the touch inputs correctly mapped.
Now, the thing is I would like to be able to launch my application either in portrait or landscape mode. I've used layouts to desgin my application so it will render fine either way.
Is there a way to change those parameters on the fly, or as arguments when running the app ? Because right now, it seems I need to edit /etc/environment and then restart the Pi. And even with that, the touchscreen inputs don't change anymore... Do you have any idea on how to do that ?