[Qt-interest] Data Storage for QT Application

Ross Driedger ross at earz.ca
Fri Feb 5 11:34:12 CET 2010


On 5-Feb-10, at 2:16 AM, qt-interest-request at trolltech.com wrote:

> Thanks all, QSettings looks to be a favourite option.
> I will look at the API description ,
> Can you guys points to some example.

Assistant is your friend. :)

>
>> From what I read of QSetting it is used to save settings and then  
>> retrive
> based on specific key.
> In may case their is no key.
> Its like this.All are string data.At application start I want to  
> read the
> data and populate some UI component.Also need to delete any  
> particular row
> or add another row.I know XML is one way but some how I found their  
> API to
> be bit cryptic .
> Can this be done using QSettings?

In either case of XML or QSettings, you will need t set up a key-value  
relationship of some sort, even if the key makes no sense outside your  
application,

The QSettings API is pretty straight forward.  If you choose an XML  
solution, you will need to learn about SAX and/or DOM, but on the  
positive side, learning about XML is an important skill these days.

Ross Driedger
ross_at_earz.ca







More information about the Qt-interest-old mailing list