Qt4.8.7: QTreeView use custom model and crash when deleting item
-
@kldxxlxc said in Qt4.8.7: QTreeView use custom model and crash when deleting item:
beginResetModel();
beginRemoveRows(index.parent(),index.row(),index.row());
parentItem->DeleteChildNode(index.row(), tmpItem);
endRemoveRows();
endResetModel();Then you don't need begin/endRemoveRows() at all
I doubt there is such a simple problem even in Qt4's QAIM - implementation but rather you're doing something strange insdide parentItem->DeleteChildNode()