I've coded myself into a corner sort of with my data abstraction scheme and it's resulted in my needing editorOpened(QModelIndex) and editorClosed(QmodelIndex) signals in my views (QTableView almost exclusively).
The reason being that my data classes have automatic behavior that needs to be block/disabled during editing, then re-enabled afterwards.
At first I thought to try to do it with custom delegates but ran into problems for a couple reasons: one being just that it seems a bit excessive to use a custom delegate providing the same behavior for every single item, in other words it seems like it ought to be done for all items by the view itself. The second problem being that the delegates seem to be const
which prevents me from setting an internal handle to the data object within the delegate.
Looking at the view methods, I found QAbstractItemView::edit and QAbstractItemView::closeEditor which would be perfect candidates for re-implementing with opened() and closed() signals, however I need an index/handle to the specific item being edited, which I don't think I can obtain from within those methods...
At this point I have no idea what else I could do. I'd appreciate any tips or pointers in the right direction! Thanks for reading