Alex
Alex

Reputation: 36171

Qt: can't launch Windows console with QProcess

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.

Upvotes: 4

Views: 3794

Answers (1)

user362638
user362638

Reputation:

Try this instead:

QProcess::startDetached("cmd.exe");

Upvotes: 5

Related Questions