Qt中获取系统目录的方法
2016.06.15 14:10:14字数 51阅读 3,554
1. 获取Temp目录:
QString strDir= QDir::tempPath();
2. 获取AppData目录:
QDir dir = QDir::temp();
dir.cdUp();
QString strDir = dir.absolutePath();
3. 获取桌面目录:
QString strDir = QDir::homePath() + "/Desktop";