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:
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");
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");
To copy to clipboard, switch view to plain text mode
Does anyone have any idea about what is happening?
Thanks.
Bookmarks