I've found this Topic : Set Environment Variables for startDetached() QProcess. Which explains how to solve the Environment variables with Qt 4 by overloading the startDetached() function.
I'm encountering the same problem with startDetached(), meaning I can't set an environment variable for my newly spawn process with setEnv().
However, I'm working with Qt 4.8.5 and the post is now more than 3 years old, is there a way to set an environment variables for a detached process in Qt nowadays with Qt 4.8.5 ?
I'm a bit stuck, because I don't know how to overload a qProcess function, and I really want to find an easier solution if possible ...
Do you have an easier solution ? Or can you explain me how to apply the overloading one ?