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. eglfs rotation not reflected in screen geometry
Forum Updated to NodeBB v4.3 + New Features

eglfs rotation not reflected in screen geometry

Scheduled Pinned Locked Moved Solved Mobile and Embedded
2 Posts 1 Posters 681 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.
  • Q Offline
    Q Offline
    Quantum-Si QT
    wrote on last edited by
    #1

    Hi all, I'm developing an embedded Qt app, using the eglfs platform. I need to rotate the display to match the physical hardware. I use export QT_QPA_EGLFS_ROTATION=-90. I have two systems, one is an Intel x86 arch and on this developer system, everything is fine. By fine, I mean I set the rotation to -90, I observe the display renders correctly rotated, and when I call something like QRect r = screen->geometry(); I can see that r.width() is the rotated width, and r.height() is the rotated height.

    However, on my ARM Cortex-A53 device, running the exact same source code test, I can see that the screen contents are correctly rotated and render as expected, however, the screen geometry does not reflect this rotation. Later, this is important as it is impacting the layout widgets I use.

    Additional background: System runs ubuntu 18.04. The screen is 1080x1920 (typical cell phone industry screen). We have it mounted landscape style, hence the need to rotate the application.

    I've tried setting things like QT_QPA_EGLFS_HEIGHT, QT_QPA_EGLFS_WIDTH, and also the physical counterparts. Looking for other suggestions!

    Let me know what information you might also need from my system that fails, thanks.

    1 Reply Last reply
    0
    • Q Offline
      Q Offline
      Quantum-Si QT
      wrote on last edited by Quantum-Si QT
      #2

      I'm able to mostly work around this issue by explicitly calling setSpacing(0); on my layout objects. Seems they inherit a property that is inconsistent between arm and x86 versions of the library. This still is not fixing this case:
      QFontMetrics metrix(label->font());
      uint16_t width = metrix.boundingRect(label->text()).width();
      if (width > maxWidth)
      QString clippedText = metrix.elidedText(text, Qt::ElideRight, maxWidth);
      where the clippedText returned is incorrect (much shorter than needed) on the arm arch version.
      But I can work around this one more issue for now.

      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