[PyQt] New style signal connect not working

Baz Walter bazwal at ftml.net
Mon Jan 11 17:01:22 GMT 2016


On 11/01/16 16:56, Jannis Mainczyk wrote:
> Am 11.01.2016 um 17:52 schrieb Baz Walter:
>> On 11/01/16 16:16, Jannis Mainczyk wrote:
>>> And here is the Connection:
>>> self.Data.new_mh_added.connect(PlotListWidgets.update)
>>>
>>> The following error is raised:
>>> TypeError: update() missing 1 required
>>> positional argument: 'self'
>>>
>>> Is that a bug or am I missing something here?
>>
>> self.Data.new_mh_added.connect(self.update)
>>
>
> but they are not in the same class. I cannot reference update() by
> self.update(), as it is in the "PlotListWidgets" class
>


Okay - but the point is, you need an *instance* of PlotListWidgets, not 
the class itself.


More information about the PyQt mailing list