tags:

views:

365

answers:

1

Hi all,

I'm trying to start a program using QProcess (Qt4.4 on vista64bit, developing in MSVC2005). The program is not in the path so I tried to add the directory the program is in to the QProcess environment, in a way similar to what gets demonstrated in the documentation of QProcess::setEnvironment.

Unfortunately the program doesn't get started, apparently because the executable cannot be found in the path. Is this a known issue? Do I do something wrong?

I have verified that the path gets set by printing the QProcess environment after adding the path.

There are two workarounds: the first is to start the program with the full path, the second is to add the directory to the path before starting the executable, but I don't want to use either.

+2  A: 

related questions