update the model?
i have a treeview which gets populated with data. also, i have a widget that displays info about a treeview node. so, for example, if a treeview folder doesn't contain anything, the widget shows nothing, and if it does, the data is displayed.
now, the thing is: when i decide whether or not to populate the widget, i check the number of the items the node has. now, if i run a script that displays info for all nodes, for empty nodes i get the some data displayed (like, the data of the previous iteration node). however, when i manually select the nodes i need info for, the widget gets updated appropriately.
so i think the model somehow doesn't get to get updated in time and my code for checking whether it has children, returns false. well the pseudo-code is basically:
if the folder doesn't have children show a blank widget
so for some empty node, the if has_children returns true which is negated, so a blank widget doesn't get a chance to be displayed.
the code is too long so i can't put it here but i'll answer if anything is needed for helping.
thanks in advance
What type of model are you talking about ?
How is it populated ?
How is it updated ?