要加 /c 参数
QProcess p; p.start("cmd", QStringList()<<"/c"<<"ping www.bing.com");
[Qt]执行cmd命令
原文:https://www.cnblogs.com/liujx2019/p/10620690.html