[Qt-interest] Data Storage for QT Application

Ross Driedger ross at earz.ca
Thu Feb 4 19:13:25 CET 2010


On 4-Feb-10, at 12:03 PM, qt-interest-request at trolltech.com wrote:

>
> Message: 1
> Date: Thu, 4 Feb 2010 21:25:34 +0530
> From: Chitrang Srivastava <chitrang.srivastava at gmail.com>
> Subject: [Qt-interest] Data Storage for QT Application
> To: qt-interest at trolltech.com
> Message-ID:
> 	<75ad89fd1002040755k357f4a67h581a54941a8b242b at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi,
>
> I want to store/modify  some data in my application which i want to  
> persist
> across application instances i.e. when I close and re-open  
> application I can
> see modified data.

Assuming that the data is not part of a document and is really not  
suited to QSettings,I suggest that you have a simple XML file that is  
loaded on program start and written on program exit.

But first, I would consider using QSettings, because keeping multiple  
support and configuration files can turn into a head-ache.

>
> I check API , I guess I can use Qt-XML or QSqlDatabase.
> Qt-XML  API are a bit confusing so I want to avoid it.
> QSqlData is bit too much for my app , I have just 3 string per row.

The QSql module is actually pretty lean compared t other XML  
implementations.  Once you get used to it, it's a very effective way  
of doing this sort of thing.


Ross Driedger
ross_at_earz.ca




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100204/98ac51ec/attachment.html 


More information about the Qt-interest-old mailing list