Reputation: 1019
I want to use QAbstractItemModel as many times before which will hold a tree structure from an external model. This model can send notifications before deleting a row and after finishing deleting a row. These notofications can happen at any time (within same GUI thread).
QAbstractItemModel has the beginRemoveRows and endRemoveRows which is then connected to the model signals. What I don't understand is how I get the QModelIndex. My underlying data model does not know anything about QAbstractItemModel which is per design because I wan to use that in other places where Qt is inacceptable.
What is the right way to get the QModelIndex when I know what is the index of the element inside the underlying data structure and have access to the parent?
Upvotes: 0
Views: 246