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>
This commit is contained in:
Richard Moe Gustavsen 2013-12-12 13:47:44 +01:00 committed by The Qt Project
parent 1090ee664b
commit 97fd5399bc

View File

@ -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);