Skip to main content

Command Palette

Search for a command to run...

Qt's QProcessEnvironment cannot be used to change the current environment

Updated
1 min read

http://doc.qt.io/qt-4.8/qprocessenvironment.html

Sadly, and obscurely, Qt's QProcessEnvironment can't change the running environment. If you call QProcessEnvironment::systemEnvironment(), that returns the current environment by value. Any changes you make to the returned object are discarded. You must instead use _putenv() to change environment variables.

More from this blog

Roderick's Debug Diary

58 posts

https://mastodon.social/@rvkennedy