blob: 174b8788f5a17af82cb9adbc04a0d54dcac93d3a (
plain)
1
2
3
4
5
6
7
8
9
|
//! [0]
class HelloWorldTask(QRunnable):
def run(self):
print "Hello world from thread", QThread.currentThread()
hello = HelloWorldTask()
# QThreadPool takes ownership and deletes 'hello' automatically
QThreadPool.globalInstance()->start(hello)
//! [0]
|