[SOLVED]Saving Game Possibiliy in Qt question
-
It is not possible from JS AFAIK, but you always can use C++ backend.
-
Maybe this will help:
http://doc.qt.nokia.com/4.7-snapshot/declarative-sqllocalstorage.html -
Not sure that sqlstorage is something needed for saving. In this case I'll add couple of methods in C++ part and will invoke them from QML. Not hard, really.
-
Look "here":http://doc.qt.nokia.com/4.7/qml-extending.html and maybe "here":http://doc.qt.nokia.com/4.7/qml-extending-tutorial-index.html .
In couple of words. The easiest solution for you will be to add QObject subclass to your project, add couple of slots (or Q_INVOKABLE methods) there and set its instance as context property for your declarative engine.
-
Format choise is up to you :) If you need to store some tree data or you want to edit it in your text editor later or you just need non-binary format then xml is ok.