Qt application does not run on Display with DPI
-
Hello folks,
I have written an application in Qt (QML) that runs fine on the HDMI port. If I want to show the application on a display connected via DPI, the display goes off and shows nothing. But the Desktop is running (after restart :)).
I have the assumption that it is due to the graphics driver. Am I right with this assumption?
Do you have any information about this, or can you tell me where I can find some information?
Or what other data do you need to help me?Information about the System:
- CM3+
- Display 800x480, connected via DPI (https://www.raspberrypi.org/documentation/hardware/raspberrypi/dpi/README.md)
- CrossCompile Qt 5.13.1 on Ubuntu 20.04, with EGLFS driver (https://wiki.qt.io/RaspberryPi2EGLFS)
- Raspbian 9, Kernel 4.19.108
Thanks for your help.
-
@Krulle I think I have the same issue currently, but no solution :(
My QML app displays fine on the HDMI port but receives no update/repaint on the DisplayPort, I can still click on it and technically interact (I see related console output), but the windows remains white. QWidgets works fine though.
MacOS(BigSur)
Qt 5.12.6 & 5.15.2
QML only QWidgets is fine (for 5.15.2 not for 5.12.6)I'll post here if I find a solution for my problem, maybe someone else has an idea/solution before that :D
-
Hi,
Looks like you guys have material for a new bug report.
-
@Krulle said in Qt application does not run on Display with DPI:
EDIT:
It seems, that the problem exists only with QQmlApplicationEngine.
QQuickView runs without problems.Sadly I can't check that currently, for the rest of the week I'm in HomeOffice and my setup here is without DisplayPort 😕
Looks like you guys have material for a new bug report.
technically, I opened a support ticket about the issue, usually that will result in a Bug-Report entry, if its a bug 😬
-
Hey folks,
yesterday I did some research and I have the assumption that it is due to the graphics driver (open GL).
https://www.raspberrypi.org/forums/viewtopic.php?t=137567
https://www.raspberrypi.org/forums/viewtopic.php?t=259119The solution may be found in the second link. I haven't tried this solution yet, because I postponed the problem for now and will return to it later.
-
So, I was also able to "fix" the issue.
By forcing Qt to use the native graphic apis instead of OpenGL, my QML application is now rendered correctly on all monitors
set the environment variable QSG_RHI=1 and you should be fine
Special thanks to @JKSH for pointing me in the right direction!
-
@J-Hilk said in Qt application does not run on Display with DPI:
By forcing Qt to use the native graphic apis instead of OpenGL, my QML application is now rendered correctly on all monitors
set the environment variable QSG_RHI=1 and you should be fine
Special thanks to @JKSH for pointing me in the right direction!
You're welcome!
Notes from https://www.qt.io/blog/qt-quick-on-vulkan-metal-direct3d :
QSG_RHI=1
only works in Qt 5.14 and above.QSG_RHI=1
switches the Qt Quick scene graph to Direct3D 11 on Windows and Metal on macOS. However OpenGL is still used by default on other targets.
I notice that @Krulle is using Qt 5.13 on Ubuntu and Raspbian. So to try the same fix as @J-Hilk, I think we also need to upgrade Qt, install Vulkan drivers, and set
QSG_RHI_BACKEND=vulkan
(Disclaimer: I haven't tried this myself)