Skip to content
Advertisement

PySide2 Custom Signal Error: “AttributeError: ‘function’ object has no attribute ‘connect'”

This is my third project using PySide and I came across an unusual error when trying to use custom Signals and Slots. Below is a variation of what I am working on that is giving me the AttributeError. I have used a similar syntax for other projects with no issues, so any help is appreciated. I do understand per the error that I am trying to connect a function to a slot, however if I use the @Signal decorator I receive a separate error basically saying that I cannot use it.

JavaScript

Advertisement

Answer

The signal is called “signal”, “changed” is just a method where the signal is emitted. Recommendation: Use more descriptive names to avoid this type of confusion

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement