PDA

View Full Version : QTreeView & setRootIndex



Anonymous
10th May 2010, 12:50
Hi,

I have the following hierarchic data, populated using a model:
.Root
...Parent1
...Parent2
...Parent3
......Child1
......Child2

and I need to have the QTreeView display the following:
Parent3
...Child1
...Child2

using treeView->setRootIndex(Parent3), will only show the children.

So, I suppose I need to use a proxy model and then filter the items, but how I could do that?


Thanks

tbscope
11th May 2010, 05:51
Did you set the view to show the root item?