QProcess 运行失败 code 1
QString app = "\""+cur + "/" + "xxx.exe\""; QStringList args; QString addr = "-addr=\"" + text+"\"";// 参数包含双引号 就会失败 ... args << addr << product << out << command; p.start(app, args); p.waitForStarted(); p.waitForFinished(); code = p.exitCode(); QString msg = p.readAll();
QProcess 参数中包含双引号 会失败。code 为1
踩坑之路多回顾,不要在一个坑掉两次!
THINK TWICE,CODE ONCE!