qt - QSettings and "foldered", non-flat output -


a registry root of application can tree-like structure "folders" , "nodes". pfile on mac can have inner dictionaries folders. whatever qsettings flat, if use group. there api that’ll let me "create folder" translate in windows registry 'folder', , new dictionary on pfile?

there no publish way describe. can store qt container types qlist , qmap in qsettings. resulting registry or plist won't want serves want accomplish. unless, of course, want registry or plist compatible other applications arrange settings way.

edit

actually, after test, on mac qsettings use plist natives standard types. need put them in qvariant. example:

qlist<qvariant> array; array << 1 << 2 << "3"; qmap<qstring, qvariant> list; list["one"] = 1; list["two"] = "2"; list["3"] = array; qsettings().setvalue("somelist", list); 

the above code produces following plist entry:

<key>somelist</key> <dict>     <key>3</key>     <array>         <array>             <integer>1</integer>             <integer>2</integer>             <string>3</string>         </array>     </array>     <key>one</key>     <integer>1</integer>     <key>two</key>     <string>2</string> </dict> 

so long convert values qvariant, qsettings seem try use native types in plist. don't know enough windows registry know if same there.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -