Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import sys
- from PyQt4 import QtGui, QtCore
- class FooThread(QtCore.QThread):
- def __init__(self, foo):
- super(FooThread, self).__init__()
- self.foo = foo
- def run(self):
- print self.foo
- def main():
- app = QtGui.QApplication(sys.argv)
- foo_thread = FooThread('foo')
- foo_thread.start()
- foo_thread.finished.connect(QtGui.qApp.exit)
- sys.exit(app.exec_())
- if __name__ == '__main__':
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement