Hi, I have a QTreeView with custom model derived from QAbstractItemModel. I want to disable the parent item until all of its child items gets populated. Once done, then I have to enable the parent item. How can I achieve this using flags() function?

I want this kind of behavior for all the tree nodes to avoid user click till it is fully loaded.

Please help on this