Try the following:
QProcess process; process.setWorkingDirectory("D:\\MyWork\\Temp\\source"); process.start("git", QStringList() << "gui");
Or if you want to do this on one line, you can do it (here we use startDetached instead of start ):
QProcess::startDetached("git", QStringList() << "gui", "D:\\MyWork\\Temp\\source");
In the second case, it is better to check the return code (to show an error message if your program cannot start an external program). You can also put all arguments in the first line of program (i.e. process.start("git gui"); too):
bool res = QProcess::startDetached("git gui", QStringList(), "D:\\MyWork\\Temp\\source"); if (!res) {
source share