PDA

View Full Version : QProcess::start() cannot run a excute file while the QProcess::state() is QProcess::R



wolfguolei
1st June 2013, 06:16
Hi there, I got a piece of code right down here:


fullPath = QString("E:/bin/fis/wave.exe"));
QProcess *process = new QProcess();
process->start(fullPath);
if(!process->waitForStarted())
{
qDebug() << process->state();
}
qDebug() << "~" << process->state();

The qDebug() output is:


~ 2

It means running (QProcess::Running equals 2) ,but I cannot see any process called wave running on my computer through Task Manager, neither the GUI. Anybody has suggestions?

sonulohani
3rd June 2013, 14:11
By the time you are seeing that process would already got into an end.