In some places it suggests, I can't run a pre-built c++ binary with QProcess. at the same time there are other questions where people are executing shell scripts etc with QProcess so I am confused. Can I execute a pre-built c++ binary using QProcess.
This binary reads a text file and creates two text files in return.
I created a basic UI with GUI and have a button which when clicked calls the external binary.
Running this with execute gives me an error of QIODevice: read: device not open. When I use start, no errors are reported. But no output files are created either.
Any ideas whether this is permitted in qt or some other approach needs to be followed.
void MainWindow::on_startButton_clicked()
{
QString program = "./home/naveen/sdj";
QProcess *myProcess = new QProcess(this);
myProcess->start(program);
myProcess->waitForFinished();
qDebug() << myProcess->exitStatus();
qDebug() << myProcess->readAllStandardError();
}