Details
-
Bug
-
Resolution: Duplicate
-
Not Evaluated
-
None
-
4.8.0, 4.8.x
-
None
-
* Windows 7 Ultimate 64 bit
* Visual C++ Compiler 2010 (32 bit)
* Qt 4.8.0 RC
Description
I am using the following code, which opens me a command prompt.
QProcess process(this); QProcessEnvironment env = QProcessEnvironment::systemEnvironment(); env.insert("MYTEST", "Hello"); // Add an environment variable process.setProcessEnvironment(env); process.startDetached("cmd.exe");
Now i am typing into this command prompt "echo %MYTEST%" and get the output "%MYTEST%", but expected output would be "Hello".
The problem is that startDetached(...) is static function and therefore it can't know about my Environment.
It would be great if there would be one more startDetached(...) function overload, which will take also a QProcessEnvironment as an function parameter.
Attachments
Issue Links
- duplicates
-
QTBUG-22636 Add a way to specify a QProcessEnvironment to QProcess::startDetached
-
- Closed
-