[Qt-interest] QSettings (ini) Write and Load actions
Scott Aron Bloom
Scott.Bloom at sabgroup.com
Mon May 18 16:26:55 CEST 2009
> It is surely not a performant way. But I want it to be all in a single
> file and I very much like the easy access that QSettings offers.
> If I could switch QSettings from using a ini file to a sqlite file
> format I would do that, but converting all the code to a sql database,
> without me having any clue of SQL is not an option.
>
> Matthais
>
>
You are completely misusing QSettings... And since you are backing
yourself into a corner, and refusing to look at the best optiosn out
there..
Here is an option you may want to consider....
Use a singleton for your QSettings, and access it via a reference..
QSettings sSettings;
QSettings & getSettings()
{
return sSettings;
}
And rather than creating/destroying it each time you need one value, use
sync on a predetermined basis
Scott
More information about the Qt-interest-old
mailing list