[PyQt] Listitemwidget slots

oliver oliver.schoenborn at gmail.com
Wed Aug 31 20:53:00 BST 2016

We have a list view in pyqt 5.5,  it had pure listitemwidgets, but each one
with a data object  of class MyData that had some slots connected to get
changes in the underlying item's data and update the list. In pyqt 5.7
slots that are methods decorated with pyqtSlot have to be on class deriving
from QObject. However, if we make MyData derive from  QObject, the myndata
slots don't get called. If we don't derive from QObject and don't decorate
with pyqtSlot it works fine. Driving from the item widget class doesn't
work either.

Is this expected? If not I will post a minimal example. If it is then what
is proper way, ie how are list items supposed to be listening for changes
to objects related to what they display?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20160831/7b2ea59a/attachment.html>

More information about the PyQt mailing list