Qt: Cannot start Windows console with QProcess

QProcess simply does not display the black console window.

This is the code I'm using:

QProcess*p=new QProcess(this);
p->start("cmd.exe");

Replacing cmd.exe with calc.exe successfully starts the calculator.

+3
source share
1 answer

Try this instead:

QProcess::startDetached("cmd.exe");
+5
source

All Articles