<div dir="ltr">Maybe I've not understood correctly the question, but if you know the row and column of the item for which you want to emit the notification, it should be as simple as:<div><br></div><div>self.model.itemChanged.emit(self.model.item(row, column))</div><div><br></div><div>If you only have the index, you can access the item through the itemFromIndex() method.</div><div><br></div><div>Maurizio</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il giorno mar 29 gen 2019 alle ore 20:05 Tong Zhang <<a href="mailto:warriorlance@gmail.com">warriorlance@gmail.com</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div>Hello,</div><div><br></div><div>As the doc of 'itemChanged' signal of QStandardItemModel class (<a href="http://doc.qt.io/qt-5/qstandarditemmodel.html#itemChanged" target="_blank">http://doc.qt.io/qt-5/qstandarditemmodel.html#itemChanged</a>) 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:</div><div>def on_item_changed(self, item):</div><div> pass</div><div><br></div><div>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?</div><div><br></div><div>Thanks,</div><div>Tong<br></div><div><br></div></div></div>
_______________________________________________<br>
PyQt mailing list <a href="mailto:PyQt@riverbankcomputing.com" target="_blank">PyQt@riverbankcomputing.com</a><br>
<a href="https://www.riverbankcomputing.com/mailman/listinfo/pyqt" rel="noreferrer" target="_blank">https://www.riverbankcomputing.com/mailman/listinfo/pyqt</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature">È difficile avere una convinzione precisa quando si parla delle ragioni del cuore. - "Sostiene Pereira", Antonio Tabucchi<br><a href="http://www.jidesk.net" target="_blank">http://www.jidesk.net</a></div>