hide placeholder text when QLineEdit has preedit text
Change-Id: Ica84e9ce715702b690906ef748970e16d9162c4b Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Aurélien Gâteau <agateau@kde.org>
This commit is contained in:
parent
0a55499c9a
commit
46106c4e16
@ -1802,7 +1802,7 @@ void QLineEdit::paintEvent(QPaintEvent *)
|
|||||||
int minLB = qMax(0, -fm.minLeftBearing());
|
int minLB = qMax(0, -fm.minLeftBearing());
|
||||||
int minRB = qMax(0, -fm.minRightBearing());
|
int minRB = qMax(0, -fm.minRightBearing());
|
||||||
|
|
||||||
if (d->control->text().isEmpty()) {
|
if (d->control->text().isEmpty() && d->control->preeditAreaText().isEmpty()) {
|
||||||
if (!d->placeholderText.isEmpty()) {
|
if (!d->placeholderText.isEmpty()) {
|
||||||
QColor col = pal.text().color();
|
QColor col = pal.text().color();
|
||||||
col.setAlpha(128);
|
col.setAlpha(128);
|
||||||
|
Loading…
Reference in New Issue
Block a user