From 46106c4e16dd36deb17011d8587b301971921f5c Mon Sep 17 00:00:00 2001 From: Tasuku Suzuki Date: Mon, 27 May 2013 00:37:18 +0900 Subject: [PATCH] hide placeholder text when QLineEdit has preedit text MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ica84e9ce715702b690906ef748970e16d9162c4b Reviewed-by: Gabriel de Dietrich Reviewed-by: Aurélien Gâteau --- src/widgets/widgets/qlineedit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/widgets/qlineedit.cpp b/src/widgets/widgets/qlineedit.cpp index 6d648f1126..d44e9ad02f 100644 --- a/src/widgets/widgets/qlineedit.cpp +++ b/src/widgets/widgets/qlineedit.cpp @@ -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);