Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-103353

[REG Qt5.15.2 => Qt 6.2.4] QScreen returns inconsistent screen size

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • 6.2.4
    • GUI: High-DPI
    • None

    Description

      See attached example and look at the output. Qt5 always returned the size in Qt (screen) units.

      In Qt6 the 4K screen size (i.e unit of it) is depending on 'some circumstances' with the other screen. It sometimes returns the screen size in either screen pixels and other times in Qt (screen) unit.

      It ought be extremely easy to place a widget or other graphics at the center of the screen, but with this Qt6 issue it is suddenly near hopeless. ( See also https://bugreports.qt.io/browse/QTBUG-103184 )

      PS: I didn't use QtDiag.exe because high dpi isn't enabled by default in Qt5 and I could not see an easy way to enable it by command line.

      Attachments

        1. main.cpp
          1 kB
        2. ScreenSizeIssue.pro
          0.1 kB
        3. ScreenSizeIssueOutput.txt
          2 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            sorvig Morten Sørvig
            tmartsum Thorbjørn Lund Martsum
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes