Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Qt 6
  4. Geometry of primary screen is incorrect
Qt 6.11 is out! See what's new in the release blog

Geometry of primary screen is incorrect

Scheduled Pinned Locked Moved Solved Qt 6
2 Posts 1 Posters 1.0k Views
  • 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.
  • T Offline
    T Offline
    Ttberg
    wrote on last edited by Ttberg
    #1

    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

    1 Reply Last reply
    0
    • T Offline
      T Offline
      Ttberg
      wrote on last edited by
      #2

      This is now marked as a bug:
      https://bugreports.qt.io/browse/QTBUG-103558

      1 Reply Last reply
      1

      • Login

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