Results 1 to 2 of 2

Thread: QSettings to save multiple "workspaces"

  1. #1
    Join Date
    May 2009
    Posts
    3
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11

    Default QSettings to save multiple "workspaces"

    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?

  2. #2
    Join Date
    May 2009
    Posts
    3
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11

    Default Re: QSettings to save multiple "workspaces"

    I'll reply to myself here... ended up using QDataStream and QMap. Works great!

Similar Threads

  1. Save enums in QSettings
    By redhat in forum Qt Programming
    Replies: 4
    Last Post: 22nd January 2009, 11:22
  2. QSettings does not save...
    By mtrpoland in forum Qt Programming
    Replies: 2
    Last Post: 28th August 2007, 12:15

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.