If I add items to a tree, no matter where parent I was using, I have 1,2,3, n items added.
Can I have access to an item of a tree using simply this 'pure' index ?
Thanks.
If I add items to a tree, no matter where parent I was using, I have 1,2,3, n items added.
Can I have access to an item of a tree using simply this 'pure' index ?
Thanks.
No. Nothing stops you maintaining a parallel QList of QPersistentModelIndexes which might provide something like this for small numbers of items (maintaining persistent indexes has peformance impacts). You could also maintain your own list of pointers to the QTreeWidgetItems if using the tree widget. There is no obvious natural order for this list: insertion order, top-to-bottom depth first, top-to-bottom breadth first...
Bookmarks