diff options
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativetextinput.cpp')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativetextinput.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp index 2161e23..b618183 100644 --- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp @@ -726,8 +726,18 @@ void QDeclarativeTextInput::setEchoMode(QDeclarativeTextInput::EchoMode echo) Q_D(QDeclarativeTextInput); if (echoMode() == echo) return; - + Qt::InputMethodHints imHints = inputMethodHints(); + if (echo == Password || echo == NoEcho) + imHints |= Qt::ImhHiddenText; + else + imHints &= ~Qt::ImhHiddenText; + if (echo != Normal) + imHints |= (Qt::ImhNoAutoUppercase | Qt::ImhNoPredictiveText); + else + imHints &= ~(Qt::ImhNoAutoUppercase | Qt::ImhNoPredictiveText); + setInputMethodHints(imHints); d->control->setEchoMode((uint)echo); + update(); emit echoModeChanged(echoMode()); } |