Unsolved Generate Qml-String from QObject
-
Are there any sources where this has been done? I think QtCreator does it with the designer, it would be great if I could use Qt itself for this task.
I want to serialize all Q_PROPERTIES of QObjects and the Object itself in a qml file. -
Here is a code I wrote years ago to do just that: https://github.com/sierdzio/closecombatfree/blob/master/src/ccfgamemanager.cpp#L104
It takes QObjects from QML engine, and saves all properties into a file (QML file).
-
Thanks for the Code :). I might do it similar to that and it does not really look like rocket science. Maybe QDate will be difficult to write. Maybe I can use JSON.stringify(...).