[Solved] Color of QString
General and Desktop
3
Posts
3
Posters
5.6k
Views
1
Watching
-
Look here: http://qt-project.org/doc/qt-4.8/qtextedit.html#setTextColor
You can also use html. -
Hi,
Since you are using QTextEdit it supports Rich Text's so you can set an Html to it using "setHtml":http://qt-project.org/doc/qt-5/qtextedit.html#html-prop. Using an Html document you can set lots of properties.
For E.g
@
ui->textEdit->setHtml("<font color="red">Red text</font> <font color="blue">Blue text</font>");
@