hide the keyboard when lose focus

shouldn't be necessary, but the scene seems to not emit all needed hide signals
This commit is contained in:
Marco Martin 2011-11-30 19:48:54 +01:00
parent be68daef28
commit 1014c8572e
2 changed files with 10 additions and 0 deletions

View File

@ -187,6 +187,11 @@ Item {
visible: textEdit.text == "" && !textArea.activeFocus visible: textEdit.text == "" && !textArea.activeFocus
opacity: 0.5 opacity: 0.5
} }
onActiveFocusChanged: {
if (!textField.activeFocus) {
textInput.closeSoftwareInputPanel()
}
}
} }
} }

View File

@ -155,6 +155,11 @@ Item {
color: theme.textColor color: theme.textColor
enabled: textField.enabled enabled: textField.enabled
clip: true clip: true
onActiveFocusChanged: {
if (!textField.activeFocus) {
textInput.closeSoftwareInputPanel()
}
}
// Proxying keys events is not required by the // Proxying keys events is not required by the
// common API but is desired in the plasma API. // common API but is desired in the plasma API.