デスクトップのパスを取得する
デスクトップやTempディレクトリなどの、特別なフォルダ (Special Folders) のパスを得るのには、QDesktopServices::storageLocationを使います。
#include <QDesktopServices> // デスクトップのパスを取得 QString folder = QDesktopServices::storageLocation( QDesktopServices::DesktopLocation );
取得できるパス一覧はこちらを参照。
http://doc.qt.nokia.com/main-snapshot/qdesktopservices.html