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

QWindow::safeAreaMargins() returns incorrect values when virtual keyboard opens on Android (Qt 6.9)

XMLWordPrintable

    • Android
    • 0f3a6349f (dev), b141a68a1 (6.10), c4f1c6ebf (6.9)
    • 2025wk30s2QtforAndroid

      The attached example shows the bug.

      • Build for Android (Qt 6.9).
      • Launch app on device with soft navigation bar.
      • Tap inside QTextEdit — virtual keyboard opens.
      • Check Qt Creator's console — safeAreaMargins() shows top/bottom values that look like they do not account for the screen pixel density.
      • Close keyboard → margins remain wrong.

        1. qwindowsafeareamarginstest.tar
          10 kB
          Ken Appleby
        2. Screenshot_20250702-113316.png
          58 kB
          Ken Appleby
        3. Screenshot_20250702-113335.png
          137 kB
          Ken Appleby
        4. Screenshot_20250702-113348.png
          60 kB
          Ken Appleby
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            assam Assam Boudjelthia
            kenappleby Ken Appleby
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes