//设置系统日期时间 static void SetSystemDateTime(int year,int month,int day,int hour,int min,int sec) { QProcess p(0); p.start("cmd"); p.waitForStarted(); p.write(QString("date %1-%2-%3 ").arg(year).arg(month).arg(day).toLatin1()); p.closeWriteChannel(); p.waitForFinished(1000); p.close(); p.start("cmd"); p.waitForStarted(); p.write(QString("time %1:%2:%3.00 ").arg(hour).arg(min).arg(sec).toLatin1()); p.closeWriteChannel(); p.waitForFinished(1000); p.close(); }