PDA

View Full Version : QSettings to save multiple "workspaces"



Bitruder
13th May 2009, 20:57
In my application, I need to load in a bunch of data files. I have a Workspace class that keeps track of what's loaded and I would like to be able to save and restore these classes so that I can load a single file, and thus, load a bunch of files at once.

Essentially, I need to save a map of variable->string and then restore this. The QSettings class looks good for this, however, QSettings seems geared towards having a single "settings" per application. I'd want to be able to save a file anywhere and load from anywhere.

Any suggestions?

Bitruder
13th May 2009, 21:56
I'll reply to myself here... ended up using QDataStream and QMap. Works great!