The problem is with the signature of dataChanged
signal. In Qt4 it looked like this:
dataChanged(const QModelIndex & topLeft, const QModelIndex & bottomRight)
but in Qt5, it looks like this:
dataChanged(const QModelIndex & topLeft, const QModelIndex & bottomRight,
const QVector<int> & roles = QVector<int>())
when I tried your example code with PyQt-5.1.1, I got an error when attempting to emit the signal without the third argument. Strictly speaking, this was incorrect behaviour, because the third argument has a default value. So this is perhaps why the behaviour has changed.
But it seems that you must now explicitly emit an empty list as the third argument of dataChanged
in order for things to work properly in PyQt5:
self.dataChanged.emit(index, index, [])
or, of course, emit a list of the roles that have actually been changed:
self.dataChanged.emit(index, index, [QtCore.Qt.EditRole])