Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

How to save and restore Tree Items of table model



  • How can i Serialize Tree structure and restore it back again.

    my tree Item data structure looks like this.

    private:
    QList<TreeItem*> childItems;
    Container* itemData;
    TreeItem* parentItem;

    For a start i tried using boost Serialization and i am now able to serialize the itemData and restore it back.

    But i still face the problem of serializing the tree structure.

    1. I can run a recursion and serialize all the Container* itemData; items in my tree view.

    2. How can i restore them back in the Tree structure in the same hierarchy.


Log in to reply