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

Physical DPI on iOS is wrong for iPad Mini, iphone 6 plus

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.5.1
    • Fix Version/s: 5.6.0 Beta
    • Component/s: QPA
    • Labels:
      None
    • Environment:
      iPad Mini 4, ios9
    • Platform/s:
      iOS/tvOS/watchOS
    • Commits:
      2ab6963e9597f42609632ff25a696b14a63d2fd8

      Description

      QScreen* screen = QGuiApplication::primaryScreen();
      qDebug("============DPI %f(%f) %f(%f) dpr (%f)",
               screen->logicalDotsPerInchX(), screen->logicalDotsPerInchY(),
               screen->physicalDotsPerInchX(), screen->physicalDotsPerInchY(), screen->devicePixelRatio()
               );
      qDebug("===========Physical size (%f x %f)", screen->physicalSize().width(), screen->physicalSize().height());
      

      iPad Mini 1 (actual resolution 163ppi)

      ============DPI 72.000000(72.000000) 163.000000(163.000000) dpr (1.000000)
      ===========Physical size (119.676074 x 159.568098)
      

      iPad Mini 4 (326ppi)

      ============DPI 72.000000(72.000000) 132.000000(132.000000) dpr (2.000000)
      ===========Physical size (147.781818 x 197.042424)
      

      The physicalDotsPerInch is correct on iPad Mini 1 but not correct on iPad mini 4 (it should be 163 too)

      Checking the code at https://github.com/qtproject/qtbase/blob/f40593b11199fbef886bfcb6b210a214d8c3adf3/src/plugins/platforms/ios/qiosscreen.mm#L180 it seems this value will also be wrong for iPad mini 2 and 3. Also probably for iphone 6 plus and iPhone 6S plus (both 401ppi native)

      Hardware strings and resolution can be found here https://en.wikipedia.org/wiki/List_of_iOS_devices#iPhone

        Attachments

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

          Activity

            People

            Assignee:
            vestbo Tor Arne Vestbø
            Reporter:
            lasconic Lasconic
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes