Reputation: 388
I have one Qt application (App1). I want to run App1 from another qt application (App2). I have tried using QProcess but App1 doesnt run. Kindly help me out. I am working on RHEL 6.
QProcess process = new QProcess();
QString program = "/home/user1/Desktop/MyApp/App1";
process->start(program);
Upvotes: 0
Views: 1561
Reputation: 11
Try this:
QProcess *p= new QProcess(this);
p->start("yourotherapp.exe",QIODevice::ReadWrite);
Upvotes: 1
Reputation: 9976
Try this:
int exitCode = QProcess::execute(program);
qDebug("Exit code is: %d.", exitCode);
and check what happens. This is a sync call. After you understand what is happening, change it back to async if you need it.
Upvotes: 1