调用QStandardPaths类
#include <QStandardPaths>
QString dir_str = QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation);
调用QStandardPaths类
#include <QStandardPaths>
QString dir_str = QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation);