Results 1 to 5 of 5

Thread: Ho to get the windows system directory with Qt4

  1. #1
    Join Date
    Jun 2007
    Location
    italy
    Posts
    126
    Thanks
    15
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question Ho to get the windows system directory with Qt4

    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

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Ho to get the windows system directory with Qt4

    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.

  3. #3
    Join Date
    Jun 2007
    Location
    italy
    Posts
    126
    Thanks
    15
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Ho to get the windows system directory with Qt4

    Quote Originally Posted by wysota View Post
    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

  4. #4
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Ho to get the windows system directory with Qt4

    see QProcess::systemEnvironment().
    It's static.

    regards

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Ho to get the windows system directory with Qt4

    Quote Originally Posted by rmagro View Post
    Can you just briefly show me hoe to use the getenv() function ?
    Qt Code:
    1. #include <stdlib.h>
    2. char *getenv(const char *name);
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. qt-3.3.8 fail in scratchbox
    By nass in forum Installation and Deployment
    Replies: 0
    Last Post: 25th May 2007, 15:21
  2. QT 4.2.2 Windows Mingw
    By KaptainKarl in forum Installation and Deployment
    Replies: 3
    Last Post: 4th May 2007, 14:57
  3. Qt Cryptographic Architecture
    By vermarajeev in forum Qt Programming
    Replies: 6
    Last Post: 9th February 2007, 13:15
  4. error in compiling qtopia.....
    By sar_van81 in forum Qt for Embedded and Mobile
    Replies: 3
    Last Post: 11th January 2007, 09:10
  5. Am I the only one with "make" error ?
    By probine in forum Installation and Deployment
    Replies: 1
    Last Post: 13th February 2006, 12:54

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.