iOS: close keyboard upon hitting key 'done'

Change-Id: I0098cc4d51ca600ba48baa15ed9c16e56529b947
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
This commit is contained in:
Richard Moe Gustavsen 2013-11-25 16:53:20 +01:00 committed by The Qt Project
parent e8f9533d4d
commit b61928e646

View File

@ -358,8 +358,11 @@
{
QString string = QString::fromUtf8([text UTF8String]);
int key = 0;
if ([text isEqualToString:@"\n"])
if ([text isEqualToString:@"\n"]) {
key = (int)Qt::Key_Return;
if (self.returnKeyType == UIReturnKeyDone)
[self resignFirstResponder];
}
// Send key event to window system interface
QWindowSystemInterface::handleKeyEvent(