定制qt调试输出qSetMessagePattern
qSetMessagePattern("[%{appname} %{type} %{time [yyyy-MM-dd hh:mm:ss]} %{file} LINE[%{line}] %{function}]: %{message}"); qInfo() << "hello"; qDebug() << "hello"; qWarning() << "hello";
qSetMessagePattern("[%{appname} %{type} %{time [yyyy-MM-dd hh:mm:ss]} %{file} LINE[%{line}] %{function}]: %{message}"); qInfo() << "hello"; qDebug() << "hello"; qWarning() << "hello";