我正在启动一个新的 QProcess
并将一些数据写入其中并关闭它以获得效果。它工作正常,但我需要写更多的数据。这不起作用,因为 WriteChannel
已经关闭。
QProcess *_helpProcess = new QProcess();
QStringList arguments;
_helpProcess->start("../bin/help_app", arguments);
_helpProcess->write(page.toStdString().c_str());
_helpProcess->closeWriteChannel();
如何解决这个问题?我可以通过某种方式重新打开 channel 吗?
最佳答案
一旦关闭 channel ,就关闭了进程之间的管道。没有回头路了!
关于c++ - qProcess写关闭写 channel 后,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6913868/