After reading this , two questions appeared:
1. It says:
sometimes it is necessary to explicitly mark a Python method as a Qt slot
Although I always use the @pyqtSlot decorator because it says:
Connecting a signal to a decorated Python method also has the advantage of reducing memory usage and is slightly faster
I ask myself: in what specific cases is this necessary? and: Are there any advantages to using the @pyqtSlot decoder?
2. The keyword argument of the result, what is its purpose?
@pyqtSlot(int, result=int) def foo(self, arg1): """ C++: int foo(int) """
It looks like a return type, but AFAIK you cannot get return values ββwhen emitting signals.
Any ideas on this?
source share