我有一个QProcess,我无法丢弃Windows机器上的输出:
QProcess * pingProcess = new QProcess;
arguments "google.com" << "-n" << "1";
pingProcess->setStandardOutputFile(pingProcess->nullDevice());
pingProcess->setStandardErrorFile(pingProcess->nullDevice());
pingProcess->setProcessChannelMode(QProcess::SeparateChannels);
int exitCode = pingProcess->execute("ping",arguments);
我仍然在命令行中输出ping
有什么想法吗?