Flake
6th September 2007, 12:26
Hi all. Sorry for my English. English is not their native language.
I am having a problem when adds system environment on Windows.
Example from the Assistant don't work:
QProcess process;
QStringList env = QProcess::systemEnvironment();
env << "TMPDIR=C:\\MyApp\\temp"; // Add an environment variable
env.replaceInStrings(QRegExp("^PATH=(.*)", Qt::CaseInsensitive), "PATH=\\1;C:\\Bin");
process.setEnvironment(env);
process.start("myapp");
Does anyone have any idea about what is happening?
Thanks.
I am having a problem when adds system environment on Windows.
Example from the Assistant don't work:
QProcess process;
QStringList env = QProcess::systemEnvironment();
env << "TMPDIR=C:\\MyApp\\temp"; // Add an environment variable
env.replaceInStrings(QRegExp("^PATH=(.*)", Qt::CaseInsensitive), "PATH=\\1;C:\\Bin");
process.setEnvironment(env);
process.start("myapp");
Does anyone have any idea about what is happening?
Thanks.