mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 22:51:17 +07:00
20 lines
354 B
Python
20 lines
354 B
Python
from PyQt5 import QtCore
|
|
import sys
|
|
|
|
|
|
class Runnable(QtCore.QRunnable):
|
|
|
|
def run(self):
|
|
app = QtCore.QCoreApplication.instance()
|
|
for i in range(3):
|
|
print("ping %d" % i)
|
|
app.quit()
|
|
|
|
|
|
app = QtCore.QCoreApplication([])
|
|
runnable = Runnable()
|
|
QtCore.QThreadPool.globalInstance().start(runnable)
|
|
sys.exit(app.exec_())
|
|
|
|
|