How to get user's download folder in Qt?
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.
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.
In Qt 4, there is QDesktopServices providing some user paths:
It has e.g. Desktop and Documents but no specific Downloads folder.
In Qt 5, use QStandardPaths:
const QString downloadsFolder = QStandardPaths::writableLocation(QStandardPaths::DownloadLocation);