A Registry root of an application can be a tree-like structure with “folders” and “nodes”. A pFile on a mac can have inner dictionaries which are like folders. Whatever I do from QSettings is flat, even if I use a group. Is there an API that’ll let me “create a folder” that will translate in windows to a registry ‘folder’, and a new Dictionary on a pfile?
Share
There no publish way to do what you describe. But you can just store Qt container types like QList and QMap in QSettings. The resulting registry or plist won’t be exactly what you want but it serves what you want to accomplish. Unless, of course, you want the registry or plist to be compatible with other applications than arrange their settings that way.
Edit
Actually, after some test, on Mac QSettings do use plist natives for standard types. You just need to put them in QVariant. For example:
The above code produces the following plist entry:
So as long you convert values to QVariant, QSettings seem to try to use native types in plist. I don’t know enough about Windows registry to know if it does the same there.