[PyQt] Emit parameter of QStandardItemModel

Tong Zhang warriorlance at gmail.com
Tue Jan 29 19:04:39 GMT 2019


As the doc of 'itemChanged' signal of QStandardItemModel class (
http://doc.qt.io/qt-5/qstandarditemmodel.html#itemChanged) states: the
parameter to be emitted is QStandardItem *item, which is the point to the
item, and in the Python program, we usually can write the following slot to
connect to:
def on_item_changed(self, item):

While not put decorator @pyqtSlot() atop, since @pyqtSlot(QStandardItem) is
not right, @pyqtSlot('QStandardItem*') works. And here is my question: If I
wanna trigger this signal emitting in a function, how can I pass the
parameter to itemChanged?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20190129/d405cb3c/attachment.html>

More information about the PyQt mailing list