[PyQt] Connecting to a QItemModel
Mads Ipsen
mpi at comxnet.dk
Sat Mar 7 00:22:16 GMT 2009
> How does one connect to the signals of a QItemModel?
>
> I tried the following, but it didn't work:
>
> self.connect(
> self.model,
> QtCore.SIGNAL('itemChanged(QStandardItem 8)'),
> self.on_model_itemChanged
> )
>
> and
>
> self.connect(
> self.model,
> QtCore.SIGNAL('itemChanged(QStandardItem &)'),
> self.on_model_itemChanged
> )
>
> Neither worked.
>
> --
> Fedora 9 : sulphur is good for the skin
> ( www.pembo13.com )
> _______________________________________________
> PyQt mailing list PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>
I believe you should do:
self.connect(self.model,
QtCore.SIGNAL('itemChanged( QStandardItem *)'),
self.foo)
At least that works for me.
Best, Mads
More information about the PyQt
mailing list