[PyQt] cannot emit destroyed event
机械唯物主义 : linjunhalida
linjunhalida at gmail.com
Wed Jul 21 08:32:33 BST 2010
here is my code, and after close the window,
stop method is not triggered as expected. what's wrong?
windows + pyqt4.5.4
from PyQt4.QtCore import *
from PyQt4.QtGui import *
class MyClass(QWidget):
def __init__(self):
QWidget.__init__(self)
self.destroyed.connect(self.stop)
def stop(self, e=None):
print("stoped")
def main():
app = QApplication([])
c = MyClass()
c.show()
app.exec_()
if __name__=="__main__":
main()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20100721/8bf35401/attachment.html>
More information about the PyQt
mailing list