Where does Qt/C++ Store System Scope QSettings on Mac OSX 10?

女生的网名这么多〃 提交于 2019-12-08 07:10:39

问题


According to Qt's docs for the latest Qt version, looking at QSettings, they say that system scope of settings on a Mac are stored in a directory /etc/xdg. Unfortunately, I'm not finding this to be the case on Mac OSX 10.10 Yosemite. Where do they store these settings? I mean, I've gotten QSettings to work in this example, but no /etc/xdg folder is to be found even when I do sudo su and assume root on my Mac in order to access that folder.


回答1:


On a MacOS, $HOME/Library/Preferences/ should be the location for user settings, while /Library/Preferences/ is the path for default settings (and a user can't write on it).

If on newer version of MacOS Qt uses the Unix' paths, then you should look at /etc/xdg/ or $HOME/.config/

In all the four cases, those directory contains a single .rc file and (optionally) a subir named as the software which contains all other config files.



来源:https://stackoverflow.com/questions/31994646/where-does-qt-c-store-system-scope-qsettings-on-mac-osx-10

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!