Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to save and restore Tree Items of table model
Forum Updated to NodeBB v4.3 + New Features

How to save and restore Tree Items of table model

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 190 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    summit
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved