Why does PySide implicitely create object members from class members for Signals?
问题 On the PySide signals and slots page it says: "Signals are runtime objects owned by instances, they are not class attributes". Apparently the QObject constructor looks in the class attributes for Signals and copies them to the object instance. This is confirmed by my test program. from PySide import QtCore class Klass(QtCore.QObject): lst = [] sig = QtCore.Signal(str) def main(): obj1 = Klass() obj2 = Klass() print "id: obj1.lst = {}, obj1.sig = {}".format(id(obj1.lst), id(obj1.sig)) print