[PyQt] New style signal connect not working

Jannis Mainczyk mainczjs at iis.fraunhofer.de
Mon Jan 11 16:56:19 GMT 2016


Am 11.01.2016 um 17:52 schrieb Baz Walter:
> On 11/01/16 16:16, Jannis Mainczyk wrote:
>> I have the exact same problem. Sadly the pyqtSlot() decorator
>> did not solve it.
>>
>> Here is the Slot Definition
>> @pyqtSlot()
>>      def update(self):
>>          try:
>>
>> Here is the Signal Definition:
>> new_mh_added = pyqtSignal()
>>
>> 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)
>
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> https://www.riverbankcomputing.com/mailman/listinfo/pyqt

but they are not in the same class. I cannot reference update() by 
self.update(), as it is in the "PlotListWidgets" class

-- 
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