summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@digia.com>2013-12-12 13:47:44 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-30 15:55:04 +0100
commit97fd5399bca4f10393884cfd3bb20c29fb5361b4 (patch)
tree9a90a2f5215d1f8e9af08d144b8188e626fc7372 /src
parent1090ee664ba14a16036eb4d539006c4f8c7a545a (diff)
QPlainTextEdit: set Qt::ImhMultiLine
Like QTextEdit, QPlainTextEdit should also set the input method hint Qt::ImhMultiLine. An important reason for this, is that the iOS plugin will inspect the input method hints of the focus object to decide which type of keyboard (and return key) to use. Failing to set this hint will result in the iOS plugin setting the return key to 'done' instead of 'return' for this widget. Change-Id: Idd5aaf21505add608f2621f94655984f42e92a18 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/widgets/widgets/qplaintextedit.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/widgets/widgets/qplaintextedit.cpp b/src/widgets/widgets/qplaintextedit.cpp
index 90f2e47cd3..5f055d436a 100644
--- a/src/widgets/widgets/qplaintextedit.cpp
+++ b/src/widgets/widgets/qplaintextedit.cpp
@@ -801,6 +801,7 @@ void QPlainTextEditPrivate::init(const QString &txt)
q->setFocusPolicy(Qt::WheelFocus);
q->setAttribute(Qt::WA_KeyCompression);
q->setAttribute(Qt::WA_InputMethodEnabled);
+ q->setInputMethodHints(Qt::ImhMultiLine);
#ifndef QT_NO_CURSOR
viewport->setCursor(Qt::IBeamCursor);