[Qt-interest] How to deal with pointers for a QDataStream?
Oliver Heins
heins at sopos.org
Mon Apr 19 14:41:45 CEST 2010
I have a data structure which holds some pointers:
class Token
{
public:
enum Type { Space, Paragraph, Kern, Char, Format, Note, End };
enum SubType { Bold, Italic,
Header1, Header2, Header3, Header4, Header5, Header6,
Itemize, Enumerate, Description, Item,
Note1, Note2, Note3, Note4, Note5 };
[...]
Type type;
SubType subType;
QChar chr;
Token *parent;
QLinkedList<Token *> children;
Token *partner;
};
As saving pointers directly to a QDataStream will obviously not work,
what would be a good strategy to save the structure?
TIA,
olli
More information about the Qt-interest-old
mailing list