Qt---打印系统时间,毫秒级
//获取当前时间
QDateTime current_date_time = QDateTime::currentDateTime();
QString current_date = current_date_time.toString("yyyy-MM-dd");
QString current_time = current_date_time.toString("hh:mm:ss.zzz ");
time_t rawtime;
time (&rawtime);
struct tm * timeinfo = localtime(&rawtime);
const int buflen = 32;
char buffer[buflen] = {0};
strftime(buffer, buflen, "%Y%m%d%H%M%S", timeinfo);
const QString strFlag = buffer;