2

If one has a graph of objects, all of which derive from QtObject, some of which make use of Qt properties, is there a built in approach or advisable approach to serializing them? I'd prefer not to use a database backed ORM, and don't need advanced means of hydrating the objects at runtime.

In other words if I serialized n objects, each of which were the root of their own graph, it would be fine by me to be able to simply read them back at runtime, and build a map of their "names" to pointers. I have need for advanced queries.

987 S
  • 219
  • 1
  • 9
  • possible duplicate of [Serialization with Qt](http://stackoverflow.com/questions/2570679/serialization-with-qt) – John Conde Jun 17 '12 at 23:30

1 Answers1

0

Qt does not provide a way to automatically serialize QObjects because there are a number of questions Qt cannot know the answers to (ie. how to serialize pointers to objects). You will need to do some work to tell Qt how to serialize your objects. Here is a post that explains how to do that.

Serialization with Qt

Community
  • 1
  • 1
Rick Smith
  • 9,031
  • 15
  • 81
  • 85