此代碼有什麼問題?我無法寫入已被分離的新進程的標準輸入。 對我來說,新過程是分離的對我來說很重要。QProcess.startDetached()並寫入其標準輸入
QProcess commandLine;
commandLine.setWorkingDirectory("E:\\"); //does not work.
commandLine.startDetached("cmd.exe"); //works (but uses wrong working dir).
commandLine.write("echo hi\0"); //writes nothing.
commandLine.write("\n\r"); //Still nothing is written!