PDA

View Full Version : Ho to get the windows system directory with Qt4



rmagro
30th August 2007, 09:56
Hi folks,

is there a way to get the Windows system directory with Qt 4?

The documentation does not show nothings useful as far as I can see

Thank you,

Roby

wysota
30th August 2007, 10:21
As far as I know the system directory is stored in one of the environment variables, so you can just use getenv() to fetch that.

rmagro
30th August 2007, 11:06
As far as I know the system directory is stored in one of the environment variables, so you can just use getenv() to fetch that.
Many thanks wysota for your reply,

Can you just briefly show me hoe to use the getenv() function ?

Thank you once again,

Roby

marcel
30th August 2007, 12:04
see QProcess::systemEnvironment().
It's static.

regards

wysota
30th August 2007, 14:30
Can you just briefly show me hoe to use the getenv() function ?


#include <stdlib.h>
char *getenv(const char *name);