PDA

View Full Version : how can i delete all items under selected item in treeview



umen
4th August 2011, 13:49
i have treeview as the view and QStandardItemModel as the model. now i each node in the model has child nodes . my question is how can i delete all the child nodes under selected item ? all i found is this but this is for one row . i need all the rows under item.

wysota
4th August 2011, 23:36
Are you able to invent an algorithm that would do what you want provided you didn't have any magic wands that would do the job in one go? If so, then write down the algorithm and then try implementing it. If you have any specific problems with it, then ask here (after providing the algorithm).