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>
This commit is contained in:
Paul Olav Tvete 2013-01-22 17:18:36 +01:00 committed by The Qt Project
parent b56caf5f4e
commit 212ff4f34d
3 changed files with 5 additions and 1 deletions

View File

@ -1305,6 +1305,8 @@ public:
ImhPreferLatin = 0x200,
ImhMultiLine = 0x400,
ImhDigitsOnly = 0x10000,
ImhFormattedNumbersOnly = 0x20000,
ImhUppercaseOnly = 0x40000,

View File

@ -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.

View File

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