我在Qt下調用system(“ping baidu.com”),如何知道ping是否成功
QProcess process;
process.start(/* command line stuff */);
process.waitForFinished(-1); // will wait forever until finished
QString stdout = process.readAllStandardOutput();
QString stderr = process.readAllStandardError();