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

Android: QScreen Physical Size Reporting Broken by 5.3.1

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.3.2
    • 5.3.1
    • QPA
    • None
    • stock Qt-5.3.1 for Android.
      linux-32, latest QtCreator, latest NDK and SDK.
      Built for API-19 and tested on Nexus-7-2013 with 4.4.2
    • Android
    • ac2b15bdd0fa960644b956fbc9a8bf9fe5ff68f5

    Description

      The code below was working properly
      with 5.2, 5.2.1 and 5.3

      With 5.3.1 the returned values are zeroes
      not depending on where the code is called.

      physicalDotsPerInchX and Y are returning inf values.

      QScreen* firstScreen =  QGuiApplication::primaryScreen();
      
      if (firstScreen)
      {
              qreal widthMM = firstScreen->physicalSize().width();
              qreal heightMM = firstScreen->physicalSize().height();
              qreal diagonalMM = sqrt(widthMM*widthMM + heightMM*heightMM);
              qDebug() << "Screen (first) Inches Size is: " << diagonalMM;
      }
      

      Attachments

        For Gerrit Dashboard: QTBUG-39978
        # Subject Branch Project Status CR V

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            coroberti Robert Iakobashvili
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes