QProcess p(0);
 p.start("route");//写入要运行的指令即可
 p.waitForStarted();
 p.waitForFinished();
 qDebug()<<QString::fromLocal8Bit(p.readAllStandardError());

 QProcess p(0);
 p.start("cmd", QStringList()<<"/c"<<"dir");//找网络ip的指令(netstat -aon|findstr 218.5.241.13:211)
 p.waitForStarted();
 p.waitForFinished();
 qDebug()<<QString::fromLocal8Bit(p.readAllStandardOutput());

 https://blog.csdn.net/qq_34389528/article/details/76283932

 

相关文章:

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