4#include <QCoreApplication>
8int main(
int argc,
char *argv[])
14 process.setCreateProcessArgumentsModifier([] (QProcess::CreateProcessArguments *
args)
16 args->flags |= CREATE_NEW_CONSOLE;
17 args->startupInfo->dwFlags &= ~STARTF_USESTDHANDLES;
18 args->startupInfo->dwFlags |= STARTF_USEFILLATTRIBUTE;
19 args->startupInfo->dwFillAttribute = BACKGROUND_BLUE | FOREGROUND_RED
20 | FOREGROUND_INTENSITY;
22 process.start(
"C:\\Windows\\System32\\cmd.exe",
QStringList() <<
"/k" <<
"title" <<
"The Child Process");
static int exec()
Enters the main event loop and waits until exit() is called, then returns the value that was set to e...
QApplication app(argc, argv)
[0]