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

Qt.inputMethod does not work with Android native keyboard in Wasm

    XMLWordPrintable

Details

    • WebAssembly

    Description

      When running on Wasm and viewing from Chrome on Android, Qt.inputMethod does not reflect the characteristics of the native Android keyboard.

      For example, given this code snippet:

      import QtQuick
      import QtQuick.Window
      import QtQuick.Controls as Controls
      
      Window {
          id: root
      
          width: 800
          height: 600
          visible: true
      
          Item {
              anchors.fill: parent
      
              Controls.TextField {
                  width: parent.width
                  anchors.centerIn: parent
                  font.pixelSize: 50
                  color: "black"
                  text: {
                      const r = Qt.inputMethod.keyboardRectangle
                      return Qt.inputMethod.visible + " %1,%2 %3x%4".arg(r.x).arg(r.y).arg(r.width).arg(r.height)
                  }
              }
          }
      }
      

      When the text field is focused and the native keyboard appears, the text field continues to show "false 0,0 0x0", but I would have expected Qt.inputMethod.visible == true and some non-zero values for Qt.inputMethod.keyboardRectangle.

      (The Android keyboard is not floating in this case; it is fixed to the bottom of the screen.)

      Attachments

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

        Activity

          People

            lopotter-ext Lorn Potter
            blammit Bea Lam
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes