Hi,
I am implementing a tree view where initially I am showing all the parents, all the child items are collapsed.
but when initially I show my tree view, data() function is calling for all the items which are collapsed(childs) also.
How to prevent the data function calling for collapsed child items also, I want my data function to be called only for the items which are visible.

I have customized QAbstractItemModel, QTreeView and using them.

Thanks in advance.