Hi,
I'm using this QTreeModel and I am dynamically adding QTreeNodes to the treeview with user mouse clicks. I notice the treeview only updates when the user closes and then expands the tree.
I would like the treeview to immediately update with the newly added node and if possible expand to this node.
Can you offer some advice on how to do this
thanks
Jack
How are you inserting the item into the tree? Are you calling insertRows/insertRow? If you are calling insertRows, then are you calling beginInsertRows and endInsertRows?
It sounds like you are adding the item to the tree data structure, but not updating the view appropriately. So, the item only gets drawn when it needs to draw the parent expansion (at this point, it would see the item).
If this doesn't help, please post some code so that we can take a look at it.
Bookmarks