Here is my custom model delete item function:
Qt Code:
/*virtual */ void ZeBaseModel::RemoveItem(ZeBaseItem & item) { int index; if ((index = mItems.indexOf(&item)) == -1) return; mItems.remove(index); RefreshView(); // If I don't call this one I get random crashes if (mItems.size() == 0) { reset(); } item.deleteLater(); }To copy to clipboard, switch view to plain text mode
When I don't call reset when my Model delete his last item I get random crashes in my view.
What signal or function am I supposed to call to notify the view that an item has been deleted ?
Bookmarks