Skip to content

Commit

Permalink
hide placeholder text when QLineEdit has preedit text
Browse files Browse the repository at this point in the history
Change-Id: Ica84e9ce715702b690906ef748970e16d9162c4b
Reviewed-by: Gabriel de Dietrich <[email protected]>
Reviewed-by: Aurélien Gâteau <[email protected]>
  • Loading branch information
task-jp authored and The Qt Project committed Jun 19, 2013
1 parent 0a55499 commit 46106c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/widgets/widgets/qlineedit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1802,7 +1802,7 @@ void QLineEdit::paintEvent(QPaintEvent *)
int minLB = qMax(0, -fm.minLeftBearing());
int minRB = qMax(0, -fm.minRightBearing());

if (d->control->text().isEmpty()) {
if (d->control->text().isEmpty() && d->control->preeditAreaText().isEmpty()) {
if (!d->placeholderText.isEmpty()) {
QColor col = pal.text().color();
col.setAlpha(128);
Expand Down

0 comments on commit 46106c4

Please sign in to comment.