Results 1 to 3 of 3

Thread: Get the 'My documents' directory or similar

  1. #1
    Join Date
    May 2012
    Posts
    99
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Question Get the 'My documents' directory or similar

    Hi all,

    I know the QDir::home() method and I get the next path:

    C:/Users/qt_developer
    I want C:/Users/qt_developer/Documents

    Is it possible to obtain the documents directory?

    Kind regards.

  2. #2
    Join Date
    Aug 2009
    Location
    Greece
    Posts
    69
    Thanks
    2
    Thanked 14 Times in 14 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Get the 'My documents' directory or similar

    In Qt 4 there is the QDesktopServices::storageLocation(StandardLocation type) where in your case StandardLocation is QDesktopServices:: DocumentsLocation

    In Qt 5 there is something similar in QStandardPaths class

  3. #3
    Join Date
    May 2012
    Posts
    99
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Get the 'My documents' directory or similar

    Thank you!

Similar Threads

  1. Opening documents on Windows
    By fober in forum Qt Programming
    Replies: 12
    Last Post: 9th February 2011, 22:27
  2. Creating documents from Qt
    By GrahamLabdon in forum Qt Programming
    Replies: 16
    Last Post: 26th April 2010, 10:00
  3. QDockWidget and Multiple Documents
    By freelucas in forum Qt Programming
    Replies: 0
    Last Post: 19th February 2010, 11:44
  4. Can Qt handle pdf documents???
    By webquinty in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 23rd March 2009, 15:16
  5. opengl documents
    By neomax in forum General Discussion
    Replies: 1
    Last Post: 20th November 2006, 07:27

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.