I've created a small test:
#include <QApplication>
#include <QProcess>
#include <QMessageBox>
#include <QString>
int main( int argc, char **argv )
{
proc.start("g++ --version");
proc.waitForFinished();
QString output
( proc.
readAllStandardOutput() );
return 0;
}
#include <QApplication>
#include <QProcess>
#include <QMessageBox>
#include <QString>
int main( int argc, char **argv )
{
QApplication app( argc, argv );
QProcess proc;
proc.start("g++ --version");
proc.waitForFinished();
QString output( proc.readAllStandardOutput() );
QMessageBox::information( 0, "test", output );
return 0;
}
To copy to clipboard, switch view to plain text mode
and it doesn't open console window. Maybe this is because you start QProcess in another thread?
Bookmarks