From 97fd5399bca4f10393884cfd3bb20c29fb5361b4 Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Thu, 12 Dec 2013 13:47:44 +0100 Subject: [PATCH] QPlainTextEdit: set Qt::ImhMultiLine MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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ø --- src/widgets/widgets/qplaintextedit.cpp | 1 + 1 file changed, 1 insertion(+) 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);