Bonjour,

Je lance un sous-programme par QProcess et je veux attendre sa fin pour récupérer ses sorties. Pour cela j'utilise la méthode waitForFinished() avec l'argument "-1" pour attendre la fin d'exécution et continuer mon programme. Mais après le start() le programme me rend immédiatement la main !?

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
 
       QProcess compilation;
       qDebug() << "Lancement " << jobname ;
       compilation.start("ss-pgm.exe", args);
       compilation.waitForFinished(-1);
       qDebug() << "Arrêt " << jobname ;
       QByteArray SortieStd = compilation.readAllStandardOutput();
       QByteArray SortieErr = compilation.readAllStandardError();