Virtual keyboard when input text has focus
-
Hi,
I have an application build in Qml using a touchscreen. I need to implement a virtual keyboard visible only when the user need focus : for example in a search field of a qml webview. It seems that there a virtual keyboard in the colibri lib. But How do I detect that for example a webview need a keyboard and hide after typing ?
-
Have you tried:
@import QtQuick 1.0
TextInput {
id: textInput
text: "Hello world!"
activeFocusOnPress: false
MouseArea {
anchors.fill: parent
onClicked: {
if (!textInput.activeFocus) {
textInput.forceActiveFocus()
textInput.openSoftwareInputPanel();
} else {
textInput.focus = false;
}
}
onPressAndHold: textInput.closeSoftwareInputPanel();
}
}@ -
There is now a Virtual Keyboard component for Qt Enterprise. But works only for X11 or Android for now, though Windows support is planned.
http://blog.qt.digia.com/blog/2014/02/04/new-virtual-keyboard-for-qt-enterprise/