[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    [PyQt] Listitemwidget slots
From:       oliver <oliver.schoenborn () gmail ! com>
Date:       2016-08-31 19:53:00
Message-ID: CAMb+DaV-BfC969y=1J3b_02-Mx1Hj2H4ZcfQm+1tyJKQ2oUong () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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?

[Attachment #5 (text/html)]

We have a list view in pyqt 5.5, =C2=A0it had pure listitemwidgets, but eac=
h one with a data object =C2=A0of class MyData that had some slots connecte=
d to get changes in the underlying item&#39;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 =C2=A0QObjec=
t, the myndata slots don&#39;t get called. If we don&#39;t derive from QObj=
ect and don&#39;t decorate with pyqtSlot it works fine. Driving from the it=
em widget class doesn&#39;t work either.=C2=A0<div><br></div><div>Is this e=
xpected? 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?=C2=A0</div>

[Attachment #6 (text/plain)]

_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic