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

REG: QScreen physicalSize() return wrong results on Android / Qt 6.5 - returns pixels not millimeters

    XMLWordPrintable

Details

    • Android
    • 436923a76 (dev), 60dd3b71b (6.6), c0e0b5605 (dev), be75a373e (6.5), b36eaa398 (6.6), 282e3a002 (6.5)
    • 2023wk18FOQtforAndroid, 2023wk20FOQtforAndroid, 2023wk22FOQtforAndroid

    Description

      When using Qt 6.5 on Android, the QScreen physicalSize() return the size of the screen in pixel instead of the size in millimeter, like before. The result is that we can't compute screen diagonal anymore.

      Qt 6.5

      UtilsScreen::printScreenInfos()
      - screen size()     QSize(393, 775)
      - screen geometry (dpi corrected)   QSize(1081, 2131)
      - screen dpi          8.82759
      - screen dpi          72
      - screen pixel ratio  2.75
      X screen size (physical, mm)        QSizeF(1080, 2340)
      - screen size (diagonal in inches)  101.465

      Qt 6.4

      UtilsScreen::printScreenInfos()
      - screen size()       QSize(393, 851)
      - screen geometry (dpi corrected)   QSize(1081, 2340)
      - screen dpi (physical) 149.03
      - screen dpi (logical)  72
      - screen pixel ratio    2.75
      > screen size (physical, mm)        QSizeF(67, 145)
      - screen size (diagonal, inches)    6.28862

       

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              assam Assam Boudjelthia
              emeric Emeric Grange
              Votes:
              5 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: