[Qt-qml] storing data for non connected apps
Bo Thorsen
bo at fioniasoftware.dk
Tue Dec 6 06:32:05 CET 2011
The SQL storage mentioned here only solves part of the problem - the
persistence. It doesn't (and can't) solve the problem of propagating the
changes all over the system.
For example, say you change the font. Now all the Text items need to
know about this. So you either have to bind those up to a shared object,
or implement something by hand.
It's a good start, but it's not the complete settings problem solved.
Bo.
Den 05-12-2011 22:37, Artem Marchenko skrev:
> 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 <mailto: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
>>> <mailto: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 <http://www.fioniasoftware.dk/>
>>> _______________________________________________
>>> Qt-qml mailing list
>>> Qt-qml at qt.nokia.com <mailto: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 <mailto: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 <mailto: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
Bo Thorsen,
Fionia Software.
--
Expert Qt and C++ developer for hire
Contact me if you need expert Qt help
http://www.fioniasoftware.dk
More information about the Qt-qml
mailing list