PDA

View Full Version : QTreeView flexibility



Defeatist
23rd February 2010, 12:20
Hi! I'm creating a small database to keep track of all my programming projects. I want to display all the items in my database using a linear tree (nodes can have multiple children but only one parent). Can I use the QTreeView for this? I've seen that the tree view has tiny icons for folders and files, this is no big deal. Another problem is I've only found tutorials on how to display directories with this itemview. I can't find an example on how to add items manually, or while looping through a text file. Any help?
Thanks in advance!

Lykurg
23rd February 2010, 13:22
If you want items use QTreeWidget. If you want use QTreeView you have to use a proper model or create your own model.