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

qApp->primaryScreen() does not return valid window size on Android

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P1: Critical P1: Critical
    • None
    • 6.5
    • QPA: Android
    • None
    • Development platform Windows 10 for both; JDK 17-0-6, NDK 25.1.8937393, deployment on armeabi-v7a and arm64-v8a
    • Android
    • 2023wk22FOQtforAndroid

      I get incorrect window size and DPI values for Android on two different phones (Android 9 and Android 13). So far I've tested with Qt 6.5.0, 6.4.3, and 6.3.2 and they are all wrong, however in Qt 5.15.3 there was no issue so I suspect this is an issue with Qt 6.

      For my phone with screen 1080 x 2246 pixels (DPI 216) the QScreen reports a size of 360x671 with a DPI of 72 for all above listed Qt 6 versions.

      No such issues on Windows deployment.

        1. DisplayScreenDPI1.7z
          28.24 MB
          Stephan '
        2. Screenshot_20230425-075513.png
          59 kB
          Stephan '
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            assam Assam Boudjelthia
            bataviasw Stephan '
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes