// Then set arguments
args <<
QString("-T%1").
arg(extension
);
args <<
QString("-o%1").
arg(filename
);
args <<
QString("%1").
arg(newFilename
);
// Finally call the process
connect( mProcess,
SIGNAL(error
(QProcess::ProcessError)),
this,
SLOT(OnProcessError
(QProcess::ProcessError)) );
connect( mProcess, SIGNAL(readyReadStandardOutput()), this, SLOT(OnStandardOutput()) );
connect( mProcess, SIGNAL(readyReadStandardError()), this, SLOT(OnErrorOutput()) );
mProcess->startDetached( dotExec, args );
bool processReturn = mProcess->waitForFinished();
delete mProcess;
mProcess = NULL;
return processReturn;
QString dotExec("dot");
// Then set arguments
QStringList args;
args << QString("-T%1").arg(extension);
args << QString("-o%1").arg(filename);
args << QString("%1").arg(newFilename);
// Finally call the process
mProcess = new QProcess;
connect( mProcess, SIGNAL(error(QProcess::ProcessError)), this, SLOT(OnProcessError(QProcess::ProcessError)) );
connect( mProcess, SIGNAL(readyReadStandardOutput()), this, SLOT(OnStandardOutput()) );
connect( mProcess, SIGNAL(readyReadStandardError()), this, SLOT(OnErrorOutput()) );
mProcess->startDetached( dotExec, args );
bool processReturn = mProcess->waitForFinished();
delete mProcess;
mProcess = NULL;
return processReturn;
To copy to clipboard, switch view to plain text mode
Bookmarks