void myProject::Project(){
connect(myProcess, SIGNAL(finished(int)), SLOT(playPause()));
qDebug() << connect(myProcess, SIGNAL(readyReadStandardError()), this, SLOT(updateError()));
qDebug() << connect(myProcess, SIGNAL(readyReadStandardOutput()), this, SLOT(updateText()));
myProcess->start("./sampledata/externalprogram.exe")
qDebug()<< "you can see from the debug area how he is running.";
}
void myProject::updateError(){
QByteArray data
= myProcess
->readAllStandardError
();
qDebug()<< data;
}
void myProject::updateText(){
QByteArray data
= myProcess
->readAllStandardOutput
();
qDebug()<< data;
}
void myProject::Project(){
QObject *parent= 0;
QProcess *myProcess = new QProcess (parent);
connect(myProcess, SIGNAL(finished(int)), SLOT(playPause()));
qDebug() << connect(myProcess, SIGNAL(readyReadStandardError()), this, SLOT(updateError()));
qDebug() << connect(myProcess, SIGNAL(readyReadStandardOutput()), this, SLOT(updateText()));
myProcess->start("./sampledata/externalprogram.exe")
qDebug()<< "you can see from the debug area how he is running.";
}
void myProject::updateError(){
QByteArray data = myProcess->readAllStandardError();
qDebug()<< data;
}
void myProject::updateText(){
QByteArray data = myProcess->readAllStandardOutput();
qDebug()<< data;
}
To copy to clipboard, switch view to plain text mode
Bookmarks