QStandardPaths
最后更新于:2022-04-02 02:15:14
[TOC]
## 概述
查询系统的常用路径
| Path type | macOS | Windows|
|---|---|---|
| DesktopLocation| "~/Desktop"|"C:/Users//Desktop"|
|DocumentsLocation|"~/Documents"|"C:/Users//Documents"|
|FontsLocation |"/System/Library/Fonts" (not writable)|"C:/Windows/Fonts" (not writable)|
|ApplicationsLocation|"/Applications" (not writable)|"C:/Users//AppData/Roaming/Microsoft/Windows/Start Menu/Programs"|
|MusicLocation|"~/Music"|"C:/Users//Music"|
|MoviesLocation|"~/Movies"|"C:/Users//Videos"|
|PicturesLocation|"~/Pictures"|"C:/Users//Pictures"|
|TempLocation|randomly generated by the OS|"C:/Users//AppData/Local/Temp"|
|HomeLocation|"~"|"C:/Users/"|
|DataLocation|"~/Library/Application Support/", "/Library/Application Support/". "/../Resources"|"C:/Users//AppData/Local/", "C:/ProgramData/", "", "/data"|
|CacheLocation|"~/Library/Caches/", "/Library/Caches/"|"C:/Users//AppData/Local//cache"|
|GenericDataLocation|"~/Library/Application Support", "/Library/Application Support"|"C:/Users//AppData/Local", "C:/ProgramData", "", "/data"|
|RuntimeLocation|"~/Library/Application Support"|"C:/Users/"|
|ConfigLocation|"~/Library/Preferences"|"C:/Users//AppData/Local/", "C:/ProgramData/"|
|GenericConfigLocation|"~/Library/Preferences"|"C:/Users//AppData/Local", "C:/ProgramData"|
|DownloadLocation|"~/Downloads"|"C:/Users//Documents"|
|GenericCacheLocation|"~/Library/Caches", "/Library/Caches"|"C:/Users//AppData/Local/cache"|
|AppDataLocation|"~/Library/Application Support/", "/Library/Application Support/". "/../Resources"|"C:/Users//AppData/Roaming/", "C:/ProgramData/", "", "/data"|
|AppLocalDataLocation|"~/Library/Application Support/", "/Library/Application Support/". "/../Resources"|"C:/Users//AppData/Local/", "C:/ProgramData/", "", "/data"|
|AppConfigLocation|"~/Library/Preferences/"|"C:/Users//AppData/Local/", "C:/ProgramData/"|
## 示例
```
qDebug()<
';