Dear all,
I have a new question for QProcess, my Qt's verison is Qt4.3.
I want to run a program by QProcess, the program need to soure env before running it.
In my program, I do like below:
QProcess *proc = new QProcess();
QStringList env = QObject::systemEnvironment();
env<<"~azhang/env/tool.env" ; // run the program need soure it.
proc->setEnvironment(env);
QStringList args;
args<<file1<<file2
proc->start(proc,args );
When I do this, the program can not be started, and the errorcode is 5 (unknow error).
So, where is my wrong?
Please help, thanks!
Bookmarks