Home > Back-end >  Qt how to write the content of the database in the qtreewidgetitem
Qt how to write the content of the database in the qtreewidgetitem

Time:01-30

Tree node, deposited in the three fields, can deposit not only, also can through the database query again restore shows the hierarchy of the tree node,

CodePudding user response:

Not all software will be used, only use Visual Studio 2013 in VB, c + +, c # dabbled, other do not invite, thank you!

CodePudding user response:

If the data is the simplest way is to click on save, generates a tree of XML and database to store the XML tree, will restore the XML data recovery

CodePudding user response:

This method is discussed, but now all have decided to use the database, and id field is the node level, node name, the higher the node id, can have a code reference

CodePudding user response:

reference twigs yao reply: 3/f
this method is discussed, but now all have decided to use the database, and id field is the node level, node name, parent node id, can have a code reference

If you would like to do so, I think that is better than doing so will the whole path as a field, (of course I'm not very clear node ID is what represents) such as the/root/root/a/b/root/root/a/a, so you need to do is string handling will make it clear of trees to keep the trees orderly and state can be solved by adding other fields

CodePudding user response:

Is a reference to the Linux or Windows path in so doing, the file system itself is also a tree I don't know if this will meet your requirements
  • Related