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)" _______________________________________________ PySide mailing list [email protected] http://lists.pyside.org/listinfo/pyside
