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.

```
bool TableModel::removeRows(int position, int rows, const QModelIndex &parent)
{
    beginRemoveRows(parent, position, position + rows - 1);

    for (int row = 0; row < rows; ++row) {
        rowList.removeAt(position);
    }

    endRemoveRows();
    return true;
}

```