开发者

how pyqt implement signal and slot in qt?

开发者 https://www.devze.com 2022-12-16 13:39 出处:网络
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.

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 th开发者_如何学JAVAe function name.

and I want to know how pyqt archive this?

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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消