Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Rotate display 180 degrees (Widgets/EGLFS)
Qt 6.11 is out! See what's new in the release blog

Rotate display 180 degrees (Widgets/EGLFS)

Scheduled Pinned Locked Moved Mobile and Embedded
5 Posts 2 Posters 3.4k Views 1 Watching
  • 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    Our project is using Qt5 Widgets on an embedded Linux platform, with EGLFS for rendering. We require the display to be installed in the system upside down, and we need to rotate the graphics 180 degrees to support this.

    I've found "this post":http://qt-project.org/forums/viewthread/23393, which eventually leads to "this bug report":https://bugreports.qt-project.org/browse/QTBUG-39959?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel . In the bug report is a very short discussion of how to accomplish this rotation in Qt 5.2, but also as mentioned in the bug report, Qt 5.3 has changed that part of the code significantly.

    I don't know a thing about OpenGL, and I'm at a loss on how to resolve this.

    Can someone make a suggestion, point me in the right direction, or (best option :) ) have a solution already?

    I'm also open to other options. I'm currently waiting for a response from Digia on whether they may be of assistance even though we're using the open source version of Qt.

    Thanks

    1 Reply Last reply
    0
    • A Offline
      A Offline
      agocs
      wrote on last edited by
      #2

      If you want to experiment and are only interested in 180 degrees rotation then you could try with the patch just posted to the Jira issue.

      1 Reply Last reply
      0
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #3

        agocs, yes, I just got the e-mail that you posted the patch! I'm going to try it now, thank you very much.

        1 Reply Last reply
        0
        • ? Offline
          ? Offline
          A Former User
          wrote on last edited by
          #4

          I just tried your changes, and I get a display that is flipped horizontally, not rotated 180. I'm playing with the code now to see if I can figure it out.

          EDIT: Might be my mistake. I had to manually modify the code because I couldn't directly apply the patch to 5.3.1. I might have changed the wrong line (the QOpenGLTextureBlitter::OriginBottomLeft part).

          1 Reply Last reply
          0
          • ? Offline
            ? Offline
            A Former User
            wrote on last edited by
            #5

            It was definately my mistake. The screen did properly rotate after I fixed that. I'm surprised that I didn't have to rotate the resistive touch sense 180 as well (which I know can be done with an environment variable) - it just worked!

            The mouse not being rotate is a bit odd, but this is a non-issue in our application.

            Laszlo, thank you!

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved