diff options
Diffstat (limited to 'src/gui/widgets/qlineedit_p.cpp')
-rw-r--r-- | src/gui/widgets/qlineedit_p.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gui/widgets/qlineedit_p.cpp b/src/gui/widgets/qlineedit_p.cpp index f0ec8ad..d907233 100644 --- a/src/gui/widgets/qlineedit_p.cpp +++ b/src/gui/widgets/qlineedit_p.cpp @@ -126,6 +126,14 @@ void QLineEditPrivate::_q_cursorPositionChanged(int from, int to) emit q->cursorPositionChanged(from, to); } +#ifdef QT_KEYPAD_NAVIGATION +void QLineEditPrivate::_q_editFocusChange(bool e) +{ + Q_Q(QLineEdit); + q->setEditFocus(e); +} +#endif + void QLineEditPrivate::init(const QString& txt) { Q_Q(QLineEdit); @@ -142,6 +150,10 @@ void QLineEditPrivate::init(const QString& txt) q, SIGNAL(returnPressed())); QObject::connect(control, SIGNAL(editingFinished()), q, SIGNAL(editingFinished())); +#ifdef QT_KEYPAD_NAVIGATION + QObject::connect(control, SIGNAL(editFocusChange(bool)), + q, SLOT(_q_editFocusChange(bool))); +#endif // for now, going completely overboard with updates. QObject::connect(control, SIGNAL(selectionChanged()), @@ -149,6 +161,9 @@ void QLineEditPrivate::init(const QString& txt) QObject::connect(control, SIGNAL(displayTextChanged(const QString &)), q, SLOT(update())); + + QObject::connect(control, SIGNAL(updateNeeded(const QRect &)), + q, SLOT(update())); control->setPasswordCharacter(q->style()->styleHint(QStyle::SH_LineEdit_PasswordCharacter)); #ifndef QT_NO_CURSOR q->setCursor(Qt::IBeamCursor); |