border.width: 3
border.color: input.activeFocus ? "black" : "grey"
+ function closeSoftwareInputPanel() {
+ input.focus = false;
+ input.closeSoftwareInputPanel();
+ }
+
TextInput {
id: input
selectByMouse: true
selectionColor: "gray"
onTextChanged: root.textChanged()
+ //focus: true
+
+ Keys.onPressed: {
+ if (event.key == Qt.Key_Enter || event.key == Qt.Key_Return) {
+ closeSoftwareInputPanel();
+ focus = false;
+ dummy.focus = true;
+ }
+ }
- Keys.onReturnPressed: {
- closeSoftwareInputPanel()
- dummy.focus = true
+ onFocusChanged: {
+ if(focus == false) {
+ closeSoftwareInputPanel();
+ }
}
}