Qt的qDebug打印加颜色
作者:互联网
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
w.show();
qDebug()<<"\033[30m" <<"Hello Xihai!";
qDebug()<<"\033[31m" <<"Hello Xihai!";
qDebug()<<"\033[32m" <<"Hello Xihai!";
qDebug()<<"\033[33m" <<"Hello Xihai!";
qDebug()<<"\033[34m" <<"Hello!";
qDebug()<<"\033[35m" <<"Hello!";
qDebug()<<"\033[36m" <<"Hello!";
qDebug()<<"\033[37m" <<"Hello!";
/* qDebug()<<"\033[40m" <<"Hello!";
qDebug()<<"\033[41m" <<"Hello!";
qDebug()<<"\033[42m" <<"Hello!";
qDebug()<<"\033[43m" <<"Hello!";
qDebug()<<"\033[44m" <<"Hello!";
qDebug()<<"\033[45m" <<"Hello!";
qDebug()<<"\033[46m" <<"Hello!";
qDebug()<<"\033[47m" <<"Hello!";*/
return a.exec();
}
标签:Qt,show,int,打印,argv,qDebug,argc 来源: https://blog.csdn.net/qq_45662588/article/details/123028577