I'm trying to get Qt to launch another Qt program when a button is clicked. Here is my code.
void Widget::launchModule(){
QString program = "C:\A2Q1-build-desktop\debug\A2Q1.exe";
QStringList arguments;
QProcess *myProcess = new QProcess(this);
myProcess->start(program, arguments);
myProcess->waitForFinished();
QString strOut = myProcess->readAllStandardOutput();
}
So it is supposed to save into the QString strOut. First of all I am having an error with the QString program line I don't understand how to point this to the program as all examples of QProcess I have looked at use / and this doesn't make sense to me. Also with the syntax of the program string correct, will this work? Thanks