diff options
Diffstat (limited to 'src/widgets/widgets/qlineedit.cpp')
-rw-r--r-- | src/widgets/widgets/qlineedit.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/widgets/widgets/qlineedit.cpp b/src/widgets/widgets/qlineedit.cpp index df5ae0171c..ee1bd315d2 100644 --- a/src/widgets/widgets/qlineedit.cpp +++ b/src/widgets/widgets/qlineedit.cpp @@ -350,7 +350,7 @@ void QLineEdit::setPlaceholderText(const QString& placeholderText) Q_D(QLineEdit); if (d->placeholderText != placeholderText) { d->placeholderText = placeholderText; - if (d->control->text().isEmpty()) + if (d->shouldShowPlaceholderText()) update(); } } @@ -1895,7 +1895,7 @@ void QLineEdit::paintEvent(QPaintEvent *) int minLB = qMax(0, -fm.minLeftBearing()); int minRB = qMax(0, -fm.minRightBearing()); - if (d->control->text().isEmpty() && d->control->preeditAreaText().isEmpty()) { + if (d->shouldShowPlaceholderText()) { if (!d->placeholderText.isEmpty()) { QColor col = pal.text().color(); col.setAlpha(128); |