PDA

View Full Version : Is there substitute method for exec()?



robgeek
12th January 2016, 22:29
Hello!

I have a program where if i click in a button, this button launches another program. To do that in Linux and using c I can use the exec family of functions. I would like to know if exists a Qt method that does the same thing in Windows. I'm using Windows 7 - 64bit and i want to do that using c++(don't know if exists a substitute for exec() in c++ too).

d_stranz
13th January 2016, 05:10
There is QProcess, which does this in a platform-independent way. If your program takes command line arguments, be sure to read carefully how to pass these to QProcess so that your program will actually run.