1,写好命令,

2,用QProcess执行,等待完成(有超时),

3,读取结果

 

注意形如“Program Files”的有 空格 的路径,要加上双引号。

 

QProcess process;
 
QString cmd = QString("\"") + path + QString("\"") + "rcfsctrl static-cfg --show";
//QMessageBox::about(NULL, "Information", ("cmd: " + cmd));
    
process.start(cmd);
process.waitForFinished();
QByteArray qbt = process.readAllStandardOutput();
QString msg = QString::fromLocal8Bit(qbt);

 

相关文章:

  • 2022-12-23
  • 2022-02-11
  • 2022-12-23
  • 2022-02-01
  • 2022-01-11
  • 2022-12-23
  • 2022-01-03
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-10-11
  • 2022-12-23
  • 2021-10-09
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案