Tutorial :how pyqt implement signal and slot in qt?



Question:

pyqt is created by SIP, and SIP support signal and slot.

qt use moc to create a moc data about the signal and slot functions.

and qt search slot by index the function name.

and I want to know how pyqt archive this?

this is a critical question for better understanding pyqt...


Solution:1

From memory, I believe that PyQt initially used only proxy objects to handle signals and slots, making it possible for any Python callable to be used as a slot and pretty much any signal to be emitted. At some point, support for static meta-objects was added, making it possible for Python to be used to write Qt Designer plugins.

I think that some Qt-specific handling code was moved from SIP into PyQt at some point, and some refactoring has taken place over time, so I think it's worth looking at PyQt's internals to start with.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »