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. Fixes: QTBUG-83295 Change-Id: Ie4bc6d9a2f27f89163c05c4c15175540c7631a30 Reviewed-by: Liang Qi <liang.qi@qt.io> (cherry picked from commit c5904cb96aed3b171c543a2cf0bed8f8ac5f95c4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
e1cc406ea4
commit
25d8f9da70
@ -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…
x
Reference in New Issue
Block a user