qt plaintextedit change message color
问题 I'm trying to color a text depending on message, i tried a lot of stuff but they change all text color not just the message that i need , exactly that one that's an error. if(Something) text = tr(""); if(SomethingElse) text = tr(""); ui->plainText->appendPlainText(text); 回答1: From Qt. doc. about QPlainTextEdit: Text can be formatted in a limited way, either using a syntax highlighter (see below), or by appending html-formatted text with appendHtml(). In the case of OP, I would recommend the