diff options
author | Sami Merila <sami.merila@nokia.com> | 2011-04-06 10:52:34 (GMT) |
---|---|---|
committer | Sami Merila <sami.merila@nokia.com> | 2011-04-06 10:52:34 (GMT) |
commit | f870613ee5632c1af87a71948dc302015d1a1d75 (patch) | |
tree | b2d6895de409cc11f9362721cfc3d5414bb89ad7 /src | |
parent | 47b03704fd906ec95dfab920d2db20726fd91700 (diff) | |
download | Qt-f870613ee5632c1af87a71948dc302015d1a1d75.zip Qt-f870613ee5632c1af87a71948dc302015d1a1d75.tar.gz Qt-f870613ee5632c1af87a71948dc302015d1a1d75.tar.bz2 |
Not possible to enter negative values to widgets with numeric fields
Currently it is not possible to enter negative number to QSpinBox (or
to any other QWidget which is handling numeric input only) in touch
devices. This is due to that AVKON virtual keyboards have
negative sign (-) in special character table(s) and it is not
accessible by default from QWidgets, unless you define widget's input
hints as ImhFormattedNumbersOnly AND ImhDialableCharactersOnly
(or non-numeric).
With this fix, default special character table is added for widgets
with numeric input mode AND either ImhFormattedNumbersOnly or
ImhDialableCharactersOnly.
By default user is still unable to enter nagative values to QSpinBox,
but developer can set inputMethodHint to work around the issue:
widget->setInputMethodHints(Qt::ImhFormattedNumbersOnly);
Task-number: QTBUG-17461
Reviewed-by: Miikka Heikkinen
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/inputmethod/qcoefepinputcontext_s60.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp index 2c70ade..3b5290c 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp +++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp @@ -726,6 +726,8 @@ void QCoeFepInputContext::applyHints(Qt::InputMethodHints hints) m_fepState->SetSpecialCharacterTableResourceId(R_AVKON_EMAIL_ADDR_SPECIAL_CHARACTER_TABLE_DIALOG); } else if (needsCharMap) { m_fepState->SetSpecialCharacterTableResourceId(R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG); + } else if ((hints & ImhFormattedNumbersOnly) || (hints & ImhDialableCharactersOnly)) { + m_fepState->SetSpecialCharacterTableResourceId(R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG); } else { m_fepState->SetSpecialCharacterTableResourceId(0); } |