QTextCharFormat tf;
tf = m_txtLog->currentCharFormat();
tf.setForeground(QBrush((Qt::GlobalColor)7));
tf.setTextOutline(QPen((Qt::GlobalColor)7));
m_txtLog->setCurrentCharFormat(tf);
m_txtLog->appendPlainText("RED");
Text will become red after the code above. but the color will disappear after I copy the colored text into Notepad.
I don't know why and please help me how to do it to keep the colored text. The QT version is QT4.8.1