Geometry of primary screen is incorrect
-
I have a display which currently have a resolution of 1024x768, and my qt application is looking fine
However, I want to rotate my display, and therefore also my qt application, so I'm using this code:QQuickView QMLScreen ... QGuiApplication::primaryScreen()->geometry() ... QMLScreen.setWidth(screenRect.width()); QMLScreen.setHeight(screenRect.height()); QMLScreen.show();
if I run xrandr --output LVDS --rotate left my screen is rotated, and the command xrandr also outputs the current resolution as 768 x 1024. However, the Qt application is not displayed correctly, the width is set to 1024 and the height to 768, while it should be the other way around.
this code worked fine on ubuntu18 & Qt5, however it does not work on ubuntu20 & qt6. As the xrandr command outputs the correct resolution, as does the command xdpyinfo | grep dimensions, I'm assuming this is not an os issue, but a Qt6 issue.
does anyone know if this is a bug in Qt6 or how to solve this issue correctly?
edit: I just run the same application using ubuntu20 & qt5, and this works as expected
-
This is now marked as a bug:
https://bugreports.qt.io/browse/QTBUG-103558