QLineEdit: Fix editingFinished() not being emitted when pressing the clear button
When pressing the clear button, the editingFinished() signal was not received when focussing out. Call _q_textEdited(QString()) when pressing the clear button. Pick-to: 5.15 6.0 Fixes: QTBUG-83295 Change-Id: Ie4bc6d9a2f27f89163c05c4c15175540c7631a30 Reviewed-by: Liang Qi <liang.qi@qt.io>
This commit is contained in:
parent
d012e953bf
commit
c5904cb96a
@ -479,7 +479,7 @@ void QLineEditPrivate::_q_clearButtonClicked()
|
|||||||
Q_Q(QLineEdit);
|
Q_Q(QLineEdit);
|
||||||
if (!q->text().isEmpty()) {
|
if (!q->text().isEmpty()) {
|
||||||
q->clear();
|
q->clear();
|
||||||
emit q->textEdited(QString());
|
_q_textEdited(QString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user