qt 创建程序目录

voidinitDir()
{
QStringuserFilePath=QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation)+"/Mysoft";
QDir*doc=newQDir;
if(!doc->exists(userFilePath))
doc->mkdir(userFilePath);
}
原文地址:https://www.cnblogs.com/lvdongjie/p/3706139.html