[Qt-interest] Data Storage for QT Application

Srdjan Todorovic todorovic.s at googlemail.com
Tue Feb 9 14:53:45 CET 2010


On 09/02/2010, Sean Harmer <sean.harmer at maps-technology.com> wrote:
> On Tuesday 09 February 2010 13:30:35 Srdjan Todorovic wrote:
>> On 09/02/2010, Sean Harmer <sean.harmer at maps-technology.com> wrote:
>> > On Tuesday 09 February 2010 13:05:23 Srdjan Todorovic wrote:
>> >> How about:
>> >>   setValue("Country_01/Name","France");
>> >>   setValue("Country_01/Capital","Paris");
>> >>   setValue("Country_02/Name","Japan")
>> >>   setValue("Country_02/Capital","Tokyo")
>> >>
>> >> And you could even have a count saved:
>> >>   setValue("NumberOfEntries","2");   or similar.
>> >>
>> >> You can do this in a loop. Does that help?
>> >
>> > Or you could even use the begin{Read|Write}Array()/endArray() functions
>> > of QSettings and let that do it for you.
>>
>> Thanks for that tip. Sadly that's not implemented in my QSettings.
>> Hopefully it is for the OP.
>
> What do you mean? These functions have been part of QSettings for as long as
> I
> can remember:
>
> http://doc.trolltech.com/4.6/qsettings.html#beginReadArray
> http://doc.trolltech.com/4.6/qsettings.html#beginWriteArray
> http://doc.trolltech.com/4.6/qsettings.html#endArray

http://doc.trolltech.com/3.3/qsettings.html     ;)

Which is why I said thanks for the tip about the array methods -
they will be used as soon the app get ported to Qt4.

Srdjan



More information about the Qt-interest-old mailing list