How can i delete all items under selected item in treeview

  • Hello
    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 ?

  • Take the selected QStandardItem and call removeRows / removeColumns on it.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.