PySide6 实践
信号槽问题 Python中的任意函数都可以作为槽函数使用而无需使用@Slot装饰器,只要它符合与信号连接的规则(参数对应上),使用@Slot显示地声明可以提高效率,而不需要Python去隐式地转换类型。 python - Is the PySide Slot Decorator Necessary? - Stack Overflow 另一篇文章Should I decorate slots in Pyside2 and if so how?的回答: As to whether you should decorate the slots, it’s a little trickier to answer – but generally speaking no, you don’t need to. The only place I know the slot decorator is needed is when a) using threads, as it ensures the decorated method is started in the correct thread, or b) when you want to explicitly map a given slot to a specific call signature (types) in C++....