On Sun, 2011-07-24 at 11:00 +0200, Sebastian Wiesner wrote: > 2011/7/23 Erik Janssens <[email protected]>: > > Hi, > > > > when connecting a Python method to the > > QObject.destroyed signal, it seems as > > if the connected slot is only called with > > one argument instead of two, this results > > in : > > > > TypeError: destroyed_slot() takes exactly 2 arguments (1 given) > > Error calling slot "destroyed_slot" > > > > while I would expect 2 arguments (self and > > the object being destroyed). > > > > am I missing something or is this possibly > > a bug ? > > The "destroyed()" signal is overloaded, so there are actually two > signals "destroyed()" and "destroyed(QObject)". You apparently > connected to the former. In order to connect to the latter, you need > to explicitly choose the right signature: > "obj.destroyed[QObject].connect(self.destroyed_slot)"
You are right, choosing the right signature works. But how do you know this signal is overloaded, I cannot see this mentioned in the docs ? _______________________________________________ PySide mailing list [email protected] http://lists.pyside.org/listinfo/pyside
