Results 1 to 11 of 11

Thread: Qt4: How to get the Common Application Data folder path?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2006
    Location
    Bangalore
    Posts
    32
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Qt4: How to get the Common Application Data folder path?

    Neat
    Thanks a lot

  2. #2
    Join Date
    Jan 2006
    Posts
    371
    Thanks
    14
    Thanked 18 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt4: How to get the Common Application Data folder path?

    be warned that those directories might have different names, depending on the windows locale.

    Check MSDN for the correct function to use. On linux, just put stuff on the user's home directory, no real standard here.

  3. #3
    Join Date
    Mar 2008
    Location
    Kraków, Poland
    Posts
    1,540
    Thanked 284 Times in 279 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt4: How to get the Common Application Data folder path?

    On Windows all this information You can read from system register from key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr entVersion\Explorer\Shell Folders. In example to read location of All User Desktop :
    Qt Code:
    1. QSettings register("HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", QSettings::NativeFormat);
    2. QString allUserDesktop( register.value("Common Desktop").toString());
    To copy to clipboard, switch view to plain text mode 
    Last edited by Lesiok; 21st October 2008 at 07:37.

  4. The following user says thank you to Lesiok for this useful post:

    minimoog (30th December 2008)

  5. #4
    Join Date
    Oct 2006
    Location
    Bangalore
    Posts
    32
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Qt4: How to get the Common Application Data folder path?

    This was very useful.
    Thank you so much.

Similar Threads

  1. Path to the previous folder
    By Zergi in forum Newbie
    Replies: 2
    Last Post: 15th July 2008, 18:24

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
  •  
Qt is a trademark of The Qt Company.