views:

39

answers:

2

How do I get the standard system / user paths in Qt?

What I really need is to get the location of the user's Downloads folder.

+3  A: 

You can use QDir::homePath() to get a QString to the home directory of the current user's profile but I'm not sure that there is a "standard" download directory identified by the OS.

Arnold Spence
+4  A: 

There is QDesktopServices providing some user paths:

http://doc.qt.nokia.com/4.6/qdesktopservices.html#StandardLocation-enum

It has e.g. Desktop and Documents but no specific Downloads folder.

Frank
+1 I knew there was something like that in Qt but my eyes weren't working last night.
Arnold Spence