Problem with QAbstractItemModel.dataChanged

Björn Künsting bjoern at corecode-dev.com
Sat Mar 4 16:59:28 GMT 2023


Hi,

I am using PyQt6 on Linux and get the following error when decorating a
function to receive QAbstractItemModel.dataChanged signals. 

TypeError: decorated slot has no signature compatible with
dataChanged(QModelIndex,QModelIndex,QList<int>)

The decorated function (inside a class):

@pyqtSlot("QModelIndex", "QModelIndex", "QList<int>")
def on_changed(self, tl: QModelIndex, br: QModelIndex, roles:
List[int])


On Windows, the same code runs flawlessly.

Am I missing something or is this a bug?


I am running:
Ubuntu 22.04.01
Kernel 5.19.0-32-generic
PyQt   6.4.2
Python 3.11.2


See also https://doc.qt.io/qt-6/qabstractitemmodel.html#dataChanged

-- 
Bjoern



More information about the PyQt mailing list