Updated the example to accept input on Android

The Android inputMethod doesn't commit the text
until a word is chosen from the suggestions list.
This makes the URL for XMLHTTPRequest invalid. To avoid
the invalid URL, we should either not use predictive text
or explicitly commit the text. I choose to go with the earlier
option.

Task-number: QTBUT-41335
Change-Id: Id03c4dc8cfbd1b32cc2868fe8b78cd039994ff71
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
This commit is contained in:
Venu 2014-09-15 17:02:43 +02:00 committed by Venugopal Shivashankar
parent edb6976120
commit d0138bbd47
1 changed files with 5 additions and 1 deletions

View File

@ -113,7 +113,11 @@ FlipBar {
hint: flipBar.placeHolder
focus: flipBar.opened
anchors { fill: parent; margins: 6 }
onAccepted: flipBar.ok()
onAccepted: {
if (Qt.inputMethod.visible)
Qt.inputMethod.hide()
flipBar.ok()
}
}
}
}