如题,有没有人做过?
------解决方案--------------------
QProcess p;
p.start("cmd.exe", QStringList() << "/c" << "c:\\uti\\mybat.bat");
if (p.waitForStarted())
{
p.waitForFinished();
qDebug() << p.readAllStandardOutput();
}
else
qDebug() << "Failed to start";
QProcess p;
p.start("cmd.exe", QStringList() << "/c" << "c:\\uti\\mybat.bat");
if (p.waitForStarted())
{
p.waitForFinished();
qDebug() << p.readAllStandardOutput();
}
else
qDebug() << "Failed to start";