Hi everyone,

I've been trying to append a directory to the path, but what I've tried hasn't worked so far. I've seen the example on QProcess but that is for windows, and it is to replace the whole PATH variable. I only want to append something to it.
Qt Code:
  1. QStringList env = QProcess::systemEnvironment();
  2. env << "CWPROOT=" + environment;
  3. // env << "PATH=$PATH:" + environment + "/bin";
  4. env.replaceInStrings(QRegExp("^PATH=(.*)", Qt::CaseInsensitive), "PATH=/1:/bin:" + environment + "/bin");
  5. syncImage.setEnvironment(env);
To copy to clipboard, switch view to plain text mode