Solved Can't open non QT based exe files successfully with QProcess
-
Hi.
I can open the same QT program which im using with no problem,
but if i try to open any of my own games, they just crash right away.Does this have something to do with different libraries, since my games are SDL2-based or am I just doing something terribly frong?
This is the code im using to open the file:
QProcess *process = new QProcess(this); process->start(project.ExePath);
-
Hi! You can use the static method to open your games.
QProcess::startDetached(project.ExePath);
or
QProcess *process = new QProcess(this); process->startDetached(project.ExePath); process->deleteLater();
Here is detailed information about the method - http://doc.qt.io/qt-5/qprocess.html#startDetached
-
Solved!
It tried to open E-drive files from the C-drive.
-
Hi @AasiApina,
glad you figured it out. So please mark this topic as SOLVED now. Thanks.