Michael Clerx
Michael Clerx

Reputation: 3056

In PyQt, do I need to disconnect from signals when discarding an item?

I'm using PyQt to build an interface where multiple components listen for changes in a data model using new-style signals. Sometimes, QGraphicsItems are created and connected to signals in the model. When a part of the model is deleted, the graphics scene removes the item again. My question is: Do I need to disconnect the signal first?

Upvotes: 0

Views: 65

Answers (1)

Bo Milanovich
Bo Milanovich

Reputation: 8203

No, PyQt/Python will do that automatically for you.

Upvotes: 1

Related Questions