I was wondering if there is a way to use QProcess
to start the main.cpp of another class to enter into its execution as such
QProcess *myProcessA = new QProcess();
myProcessA->start("*Anotherclass*main.cpp");
I can start applications and other executable arguments via QProcess
, but the reason is I am integrating an external application (not written in C++) into a widget in Qt.
I can launch the external app via QProcess
fine, but to embed it I need to launch it in another main thread that would hold the process I already created and sync them.
Sounds confusing but please my question is just plain and simple:
QProcess *myProcessA = new QProcess();
myProcessA->start("*Anotherclass*main.cpp");
Or better still, how to set an argument/path to run a class file using QProcess
?