diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2016-03-26 21:27:48 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-03-26 21:49:19 -0700 |
commit | 7434e4213b5771cf4d3c805b1ddc44716f087a83 (patch) | |
tree | 9c1865ad92f15b6946b03e42d2965dfc120b7224 | |
parent | e216f91ebc5686040b028267baac0d9e649cc47a (diff) | |
download | subsurface-7434e4213b5771cf4d3c805b1ddc44716f087a83.tar.gz |
QML UI: show keyboard when entering credential screen
If the user goes to the credentials screen, they likely want to edit
something. So put the focus on the first entry field and show the
keyboard.
We also need to hide the keyboard when the credential screen becomes
invisble so that the keyboard doesn't stay around when the dive list
is shown.
Suggested-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | qt-mobile/qml/CloudCredentials.qml | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/qt-mobile/qml/CloudCredentials.qml b/qt-mobile/qml/CloudCredentials.qml index b31e59c03..6da8b0bab 100644 --- a/qt-mobile/qml/CloudCredentials.qml +++ b/qt-mobile/qml/CloudCredentials.qml @@ -23,6 +23,16 @@ Item { ColumnLayout { id: outerLayout width: subsurfaceTheme.columnWidth - 2 * MobileComponents.Units.gridUnit + + onVisibleChanged: { + if (visible) { + Qt.inputMethod.show() + login.forceActiveFocus() + } else { + Qt.inputMethod.hide() + } + } + MobileComponents.Heading { text: "Cloud credentials" level: headingLevel |