The problem with the dataChanged signal is that it is also generated when programmatically changing the data (setData). If the program calls setData (), and the slot should not start, then the only solution is to implement a custom delegate.
QAbstractItemView has virtual methods commitData and closeEditor, but they do not accept the index as a parameter, and I'm not 100% sure. currentIndex () will always be correct ... (for sure, QAIV does not rely on this because it has constant editors, so it has an internal hash).
source share