Fix setPlaceholderText in QLineEdit
Since we don't use focus to show/hide place holder text, we don't need to check widget focus but if text is empty. Change-Id: I37f2fdb9e20a64ca38c61e60190f95635695c613 Reviewed-by: Aurélien Gâteau <agateau@kde.org> Reviewed-by: David Faure (KDE) <faure@kde.org>
This commit is contained in:
parent
062974bf1f
commit
ba1aefa85d
@ -351,7 +351,7 @@ void QLineEdit::setPlaceholderText(const QString& placeholderText)
|
||||
Q_D(QLineEdit);
|
||||
if (d->placeholderText != placeholderText) {
|
||||
d->placeholderText = placeholderText;
|
||||
if (!hasFocus())
|
||||
if (d->control->text().isEmpty())
|
||||
update();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user