QML focus iteating with QPlatformInputContext
-
Dear all,
I'm developing a QML application for a device which only have a touchscreen. To insert data, currently I'm using Maliit as input module to provide a VirtualKeyboard.
I've wrote a very simple sample:
@
import QtQuick 2.0
import QtQuick.Controls 1.1
import QtQuick.Layouts 1.1FocusScope {
id: winRootwidth: 400 height: 400 ColumnLayout { anchors.fill: parent Button { Layout.fillWidth: true text: "Quit" onClicked: Qt.quit() } Button { text: "button"; } TextEdit { Layout.fillWidth: true Layout.fillHeight: true Rectangle { anchors.fill: parent color: "red" opacity: 0.5 } } TextEdit { Layout.fillWidth: true Layout.fillHeight: true Rectangle { anchors.fill: parent color: "blue" opacity: 0.5 } } }
}
@Executing sample on the development PC, we see that the clicking on any textedit item, it receives the focus and then the maliit VK is shown. However, once the VK shown, if I click on any of the buttons of the application, the VK is not hidden. I could hide the VK if with the PC keybard I press shift + tab several times, till the focus has been assigned to any of the buttons of the application.
Is it possible set the active focus to a button (or any other item) when its has been clicked? does the focus could only be assigned when the user navigates with keys?
Joaquim Duran