[PyQt] New style signal connect not working

Jannis Mainczyk mainczjs at iis.fraunhofer.de
Mon Jan 11 17:04:20 GMT 2016


Am 11.01.2016 um 18:01 schrieb Baz Walter:
> 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.
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> https://www.riverbankcomputing.com/mailman/listinfo/pyqt
ah I see, as update is not static... thank you very much!

-- 
Jannis Mainczyk
Fraunhofer-Institut für Integrierte Schaltungen IIS
Am Wolfsmantel 33
91058 Erlangen
Telefon  +49 (0) 91 31 / 7 76-0
Fax      +49 (0) 91 31 / 7 76-20 99
E-Mail   mainczjs at iis.fraunhofer.de
Internet www.iis.fraunhofer.de


More information about the PyQt mailing list