For each OS there is a location for storing temporary data. It could be like: C:/Users/[user name]/AppData/Temp (or so). How can I get this path independently from OS with QT?
+1
A:
You want to get QDesktopServices::TempLocation
. See http://doc.trolltech.com/qtextended4.4/qdesktopservices.html#StandardLocation-enum for details.
MSalters
2010-06-22 07:49:34
+3
A:
It is not possible to get the temp directory for an arbitrary user, but for the current user you can use QDir::temp()
or QDir::tempPath()
.
Job
2010-06-22 07:50:49
Good point about the arbitrary != current user. The directory for an arbitrary user may in fact be created on demand (common in corporate Win32 environments)
MSalters
2010-06-22 10:59:02