PDA

View Full Version : Save a QTreeView... Options?



Bennisen
23rd August 2015, 09:37
Im creating a Project with a QTreeView and i later want to save my created TreeView. Which Options i have? Maybe Serialization, but i dont know which Datatype i need for this way. A Database will be an other Option, but i dont know how to realize that. Anynone has some good Tipps?

anda_skoa
23rd August 2015, 11:10
I would recommend a format that is designed for hierachical data, e.g. JSON or XML.

Cheers,
_

Bennisen
24th August 2015, 08:50
I was thinking about Databases. Is there any Tutorial where somebody explains how i do that with Databases? I read somewhere that it is possible to bind the Tree to a SQL Model, but i dont find something about it in the Internet.

anda_skoa
25th August 2015, 07:37
Well, a database is inherently table oriented, so storing a tree will need some form of parent/child relation information and code that uses that to build a tree from the "flat" database data.

Cheers,
_