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
- is required for
-
QTBUG-36015 Tasks that require coordination between WinRT, Android and iOS implementations
- Reported
- relates to
-
QTBUG-97750 QML Textfield textEdited signal noisy/misleading on Android
- Reported