QT输出打印信息至txt文件中
作者:互联网
QFile log("d:\testlog.txt");
if(!log.open(QIODevice::ReadWrite))
{
return false;
}
log.write("start-");
log.flush();
log.write(QString("Num:%1-").arg(num).toUtf8());
log.flush();
log.write(QString("size:%1-").arg(QString::number(tempFile.size())).toUtf8());
log.flush();
标签:log,arg,write,打印信息,QString,flush,txt,QT 来源: https://www.cnblogs.com/qq673613920/p/14975374.html