Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
eglfs rotation not reflected in screen geometry
Quantum-Si QT last edited by
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.
Quantum-Si QT last edited by Quantum-Si QT
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:
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.