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

Android Virtual Keyboard Rectangle always zero

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P2: Important
    • None
    • 5.5.0
    • QPA
    • None
    • Tested on Android 5.0 and older
    • Android

    Description

      Create default QtQuick project, replace it with simple code (for testing issue). If virtual keyboard visible Qt.inputMethod.keyboardRectangle.height returns "0" always. It must return actual virtual keyboard height.

      import QtQuick 2.4
      import QtQuick.Controls 1.3
      import QtQuick.Window 2.2
      import QtQuick.Dialogs 1.2
      
      ApplicationWindow {
          title: qsTr("Hello World")
          width: 640
          height: 480
          visible: true
          Item{
              anchors.fill: parent
              Rectangle{
                  anchors.fill: parent
                  color:"black"
              }
      
              Rectangle{
                  width: parent.width
                  height: 20
                  color:"red"
                  anchors.top:parent.top
                  anchors.left:parent.left
              }
              Label {
                  id: labelOut
                  y: 18
                  text: "Virtual Keyboard Visible: " + Qt.inputMethod.visible + " height: " + Qt.inputMethod.keyboardRectangle.height
                  anchors.leftMargin: 4
                  anchors.left: parent.left
                  anchors.bottom: text_field.top
                  color: "white"
              }
      
              TextField{
                  id:text_field
                  width: parent.width
                  anchors.bottom: parent.bottom
                  textColor: "grey"
              }
              Rectangle{
                  height: 1
                  color: "green"
                  width: parent.width
                  anchors.bottom: parent.bottom
              }
          }
      }
      

      Attachments

        Issue Links

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

          Activity

            People

              tvete Paul Olav Tvete
              profi-S Stanislav Ilchenko
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes