问题
QProcess simply doesn't display the black console window.
This is the code I use:
QProcess*p=new QProcess(this);
p->start("cmd.exe");
Replacing cmd.exe with calc.exe successfully launches the calculator.
回答1:
Try this instead:
QProcess::startDetached("cmd.exe");
来源:https://stackoverflow.com/questions/10363918/qt-cant-launch-windows-console-with-qprocess