Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

Qt/QML: TextInput with Keys.onPressed receives only DEL key and not other keys

$
0
0
Hi, I simplified my example as follow, but still impossible to receive keys except DEL key by onPressed or onReleased keys handler. The device I use for testing is a Samsung Tab 3 8”, with Android 4.1.2 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);     } } } On debug screen, the following error is displayed each time a key is pressed on the 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)

Viewing all articles
Browse latest Browse all 4972

Trending Articles