def main():
"""Run application."""
# Hook up Qt application to Twisted.
from twisted.internet import reactor
# Make sure stopping twisted event also shuts down QT.
reactor.addSystemEventTrigger('after', 'shutdown', app.quit)
# Shutdown twisted when window is closed.
app.connect(app, QtCore.SIGNAL("lastWindowClosed()"), reactor.stop)
# Do not block test to finish.
reactor.runReturn()
评论列表
文章目录