Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved Qt embedded dispaly and touch rotation on RPi3

    Mobile and Embedded
    1
    1
    261
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      MrEliptik last edited by

      Hi,
      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_PHYSICAL_WIDTH=86
      export QT_QPA_EGLFS_PHYSICAL_HEIGHT=154
      export QT_QPA_EGLFS_HEIGHT=800
      export QT_QPA_EGLFS_ WIDTH=480
      export QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS=DISPLAY=:0:rotate=90

      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 ?

      1 Reply Last reply Reply Quote 0
      • First post
        Last post