blob: 5a11f2fa66f5918a8cc9429b2256383d83009a1e [file]
from PyQt5 import QtCore
import sys
class AThread(QtCore.QThread):
def run(self):
for i in range(3):
print("ping %d" % i)
app = QtCore.QCoreApplication([])
thread = AThread()
thread.finished.connect(app.exit)
thread.start()
sys.exit(app.exec_())