Problem with QAbstractItemModel.dataChanged

Phil Thompson phil at riverbankcomputing.com
Mon Mar 6 18:00:31 GMT 2023


On 04/03/2023 16:59, Björn Künsting wrote:
> 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

I can't reproduce it. Please send me a short complete script that 
demonstrates the problem.

Phil


More information about the PyQt mailing list