[Qt-qml] storing data for non connected apps

Artem Marchenko artem.marchenko at gmail.com
Mon Dec 5 22:37:29 CET 2011


I was implementing something like my own QSettings with SQL local storage.
Oh, well, just a simple dictionary for textual name-value pairs actually. Works well.

Best regards,
Artem.

On 5.12.2011, at 17.28, Jesus Fernandez wrote:

> Wow this is nice! I'll take a look :)
> 
> 2011/12/5 <aaron.kennedy at nokia.com>
> Hi,
> 
> On 05/12/2011, at 3:03 PM, ext Jesus Fernandez wrote:
> 
>> Yo can try to make a QSettings wrapper class with QDeclarativeItem.
>> There is no built-in solution for local storage.
> 
> Well, there is SQL local storage, documented here http://doc.qt.nokia.com/4.7/qdeclarativeglobalobject.html#offline-storage-api
> 
> Cheers,
> 
> Aaron
> 
>> 
>> 2011/12/5 Bo Thorsen <bo at fioniasoftware.dk>
>> Den 05-12-2011 14:51, Sivan Greenberg skrev:
>> > Hi List,
>> >
>> >   I would like to know what is the recommended way now days for data
>> > storage process and retrieval apps written in preferably, pure QML?
>> >
>> >   I have and app project that needs to store data when app closes and
>> > needs to reload it when it is executed again, and/or also store data
>> > while running in the background.
>> >
>> >   What is the right QML module to use for that? Is there a recommended
>> > approach and respective code snippets anywhere?
>> 
>> There is some work on this for Qt 5 AFAIK, but for Qt 4 you don't have it.
>> 
>> My solution has so far been to have a QObject derived class that reads
>> and writes with QSettings. I expose this singleton object to the qml and
>> it has properties for each of the settings.
>> 
>> I'm not thrilled about this solution, so if someone else has a better
>> one, I'd love to hear about it.
>> 
>> If you take a look at the examples, you will see that some of them has
>> settings in a javascript file. This is basically the same idea as mine,
>> just done in javascript instead of c++. No better, no worse, IMHO, and
>> still not great.
>> 
>> Bo Thorsen,
>> Fionia Software.
>> 
>> --
>> 
>> Expert Qt and C++ developer for hire
>> Contact me if you need expert Qt help
>> http://www.fioniasoftware.dk
>> _______________________________________________
>> Qt-qml mailing list
>> Qt-qml at qt.nokia.com
>> http://lists.qt.nokia.com/mailman/listinfo/qt-qml
>> 
>> _______________________________________________
>> Qt-qml mailing list
>> Qt-qml at qt.nokia.com
>> http://lists.qt.nokia.com/mailman/listinfo/qt-qml
> 
> 
> _______________________________________________
> Qt-qml mailing list
> Qt-qml at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-qml

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20111205/5499e548/attachment.html 


More information about the Qt-qml mailing list