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

On mobile devices, tablets and smartphones, TextInput must receive keys from its virtual keyboard

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.3.1
    • None
    • Windows 7 with Qt 5.3.1 and QtCreator 3.1.2; Tablet Samsung Tab 3 8" with Android 4.1.2

    Description

      On Samsung devices, like tablets and smartphones, it is impossible to receive keys from the virtual keyboard, by using Keys.onPressed or Keys.onRelease, except for DEL and ENTER keys. So the following simple code doesn't work:

          import QtQuick 2.2
          import QtQuick.Window 2.1
          import QtQuick.Controls 1.2
           
          ApplicationWindow {
          visible: true
          width: 640
          height: 400
           
          toolBar: ToolBar {
              Row {
                  anchors.fill: parent
                  ToolButton {
                      text: "Exit"
                      onClicked: Qt.quit();
                  }
              }
          }
           
          TextInput {
              width: 200
              height: 40
              focus: true
           
              Keys.onPressed: {
                  console.log("Key="+event.key+" "+event.text);
              }
              Keys.onReleased: {
                  console.log("Key="+event.key+" "+event.text);
              }
          }
          }
      

      Currently, Qt returns an error when a key is pressed on virtual keyboard:

      W/Qt (26304): kernel\qmetaobject.cpp:1458 (static bool QMetaObject::invokeMethod(QObject*, const char*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument)): QMetaObject::invokeMethod: No such method QQuickTextInput::inputMethodQuery(Qt::InputMethodQuery,QVariant)

      The suggestion is to implement this missing functionality (may be absent also in iOS)

      Attachments

        Issue Links

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

          Activity

            People

              bachewii Jens
              magneticcore Alain
              Votes:
              3 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes