PDA

View Full Version : QSettings Redirect into Database Table



ChrisW67
17th December 2009, 23:51
Hi All,

I am making use of QSettings to store information relevant to the particular installation of my application (MRU list for example). Each document handled by the application also needs a set of information that travels within the document (default values for various things). The documents are actually SQLite databases. I'd like to be able to use the same mechanism to access both sets of information.

I can see the QSettings::registerFormat() as a way to read/write to an arbitrary QIODevice that QSettings opens before handing off to your custom read/write functions. I seem to be missing the obvious way to redirect into a settings table or othe non-QIODevice. Does anyone have a suggested approach?

Regards,
Chris