[PyQt] Connecting to a QItemModel

Arthur Pemberton pemboa at gmail.com
Sat Mar 7 01:32:31 GMT 2009


On Fri, Mar 6, 2009 at 6:22 PM, Mads Ipsen <mpi at comxnet.dk> wrote:
>> 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.
>>

>
>
> I believe you should do:
>
> self.connect(self.model,
>             QtCore.SIGNAL('itemChanged( QStandardItem *)'),
>             self.foo)
>
> At least that works for me.
>
> Best, Mads
>

I tried that. That '8' was supposed to have been an '*'


-- 
Fedora 9 : sulphur is good for the skin
( www.pembo13.com )


More information about the PyQt mailing list