void CMainForm::logMessageProc(int type, QString txt)
{
QString html = "<p><font color=\"%1\">%2<br/></font></p>";
switch (type) {
case 1:
html = html.arg("green");
break;
case -1:
html = html.arg("red");
break;
case 0:
html
QT中使用HTML 格式输出log到richEdit
最新推荐文章于 2022-05-17 19:05:17 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)