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

Details

    • Android
    • 2025wk30s2QtforAndroid

    Description

      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.

      Attachments

        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.

        Activity

          People

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

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes