summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@digia.com>2013-01-22 17:18:36 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-02-27 11:24:24 +0100
commit212ff4f34de927d1efb4845654b74d4bba8d73b7 (patch)
tree4bd77b2ccfeff2beb972efdf0f165f74f117f852 /src
parentb56caf5f4e50d867bfef4b9090b1fba130284688 (diff)
Add multi-line input method hint
Enabler for input on Android. Change-Id: I44670b95b35f773814125c5d35c67e9713567813 Reviewed-by: BogDan Vatra <bogdan@kde.org> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/global/qnamespace.h2
-rw-r--r--src/corelib/global/qnamespace.qdoc2
-rw-r--r--src/widgets/widgets/qtextedit.cpp2
3 files changed, 5 insertions, 1 deletions
diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h
index c8a615a1f7..6f977d847d 100644
--- a/src/corelib/global/qnamespace.h
+++ b/src/corelib/global/qnamespace.h
@@ -1305,6 +1305,8 @@ public:
ImhPreferLatin = 0x200,
+ ImhMultiLine = 0x400,
+
ImhDigitsOnly = 0x10000,
ImhFormattedNumbersOnly = 0x20000,
ImhUppercaseOnly = 0x40000,
diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc
index 248cdbce96..e1c64aab94 100644
--- a/src/corelib/global/qnamespace.qdoc
+++ b/src/corelib/global/qnamespace.qdoc
@@ -2330,6 +2330,8 @@
\value ImhTime The text editor functions as a time field.
\value ImhPreferLatin Latin characters are preferred (but not required).
+ \value ImhMultiLine Multiple lines can be entered into the text field.
+
Flags that restrict input (exclusive flags):
\value ImhDigitsOnly Only digits are allowed.
diff --git a/src/widgets/widgets/qtextedit.cpp b/src/widgets/widgets/qtextedit.cpp
index f033b6544c..a79cea31a1 100644
--- a/src/widgets/widgets/qtextedit.cpp
+++ b/src/widgets/widgets/qtextedit.cpp
@@ -182,7 +182,7 @@ void QTextEditPrivate::init(const QString &html)
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);
#endif