The libQtSerialization library is a Qt extension that makes it really easy to serialize your data in a forward and backward compatible way. The library is composed of two sides: the QWriter which helps you serialize data, and the QReader that helps you unserialize data. The writer is quiet straight forward. Pretty much, all you have to do is call a writeTag() function and the data gets serialized. The reader is a little more complex so the serialization can support special cases, especially sub-classes (so you can save a tree of classes) and array of classes (your tree may be composed of multiple instances of a given object.)
These details are provided for information only. No information here is legal advice and should not be used as such.