Value in specifying arg types for pyqtSignal?

Russell Warren russ at perspexis.com
Sat Jan 9 03:33:19 GMT 2021


When defining a pyqtSignal signal is there any advantage in specifying the
types for the arguments OTHER THAN them being used to match up to the
correct slot (in the event of signal/slot overloads)?

For example, if only using simple single argument signals paired with
single argument slots it will always work with `object` as the indicated
type.  Is there a disadvantage to being this generic?

For comparison, the pyqtSlot definitions give this advantage for decorating
callables with @pyqtSlot:

    > Connecting a signal to a decorated Python method also has the
advantage
    > of reducing the amount of memory used and is slightly faster.

I'm wondering if something similar exists with the extra effort of
specifying slot agrg types properly.

Russ
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20210108/43236642/attachment.htm>


More information about the PyQt mailing list