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.
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