QPlainTextEdit: not show place holder when having preedit string

Task-number: QTBUG-61210
Change-Id: I4891c21fc4e1923b5929defeacab26114c00a7e3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
This commit is contained in:
Liang Qi 2017-06-06 13:37:48 +02:00
parent 510d18d7ae
commit e1a0730448

View File

@ -1978,7 +1978,7 @@ void QPlainTextEdit::paintEvent(QPaintEvent *e)
}
if (!placeholderText().isEmpty() && document()->isEmpty()) {
if (!placeholderText().isEmpty() && document()->isEmpty() && layout->preeditAreaText().isEmpty()) {
Q_D(QPlainTextEdit);
QColor col = d->control->palette().text().color();
col.setAlpha(128);