QProcess et waitForFinished()
Bonjour,
Dans mon programme je dois lancer plusieurs instance d'un program en dehors du GUI et la deuxième instance doit attendre la fin de la permière. Sous linux la commande QProcess.waitForFinished fonctionne sans probleme. Le mème source compilé sous mac OsX donne un résultat différent la commande QProcess.waitForFinished ne semble pas fonctionner.
Voici les fonctions que j'utilise :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
void combiningDLG::imod_process(QString imod_command) {
proc.setReadChannelMode(QProcess::MergedChannels);
proc.start(imod_command);
qApp->processEvents();
Output_textBrowser-> setText(proc.readAllStandardOutput());
}
void combiningDLG::stdout_in() {
qApp->processEvents();
Output_textBrowser-> setText(proc.readAllStandardOutput());
}
void combiningDLG::procFinished(int exitCode, QProcess::ExitStatus exitStatus) {
if( exitCode == 0 && exitStatus == QProcess::NormalExit)
Output_textBrowser-> setText("command finished Ok");
else
Output_textBrowser-> setText("command finished with error");
} |
Quelqu'un a-t-il déjà eu ce type de problème ?
Merci