All,

I need to call a shell script from within my Qt 4.7 (on Linux) app and QProcess is giving me trouble.
Here is the code that does not work - meaning it does execute the shell script but the environment is false:
Qt Code:
  1. QProcess myProcess(this);
  2. myProcess->start(prog, args);
To copy to clipboard, switch view to plain text mode 
I tried setting "PATH" and some other env-variables via myProcess->setEnvironment() but with no effect. But this works fine:
Qt Code:
  1. pid_t pID = fork();
  2. if (pID == 0)
  3. execl(prog,prog,args, (char *) 0);
To copy to clipboard, switch view to plain text mode 
Any suggestion on what is going on?

Markus