|qmake:||QT += core|
|virtual void||run() = 0|
The QRunnable class is the base class for all runnable objects.
You can use QThreadPool to execute your code in a separate thread. QThreadPool deletes the QRunnable automatically if autoDelete() returns
true (the default). Use setAutoDelete() to change the auto-deletion flag.
QThreadPool supports executing the same QRunnable more than once by calling QThreadPool::tryStart(this) from within the run() function. If autoDelete is enabled the QRunnable will be deleted when the last thread exits the run function. Calling QThreadPool::start() multiple times with the same QRunnable when autoDelete is enabled creates a race condition and is not recommended.
See also QThreadPool.
Constructs a QRunnable. Auto-deletion is enabled by default.
QRunnable virtual destructor.
true is auto-deletion is enabled; false otherwise.
[pure virtual]void QRunnable::run()
Implement this pure virtual function in your subclass.
Enables auto-deletion if autoDelete is true; otherwise auto-deletion is disabled.
© The Qt Company Ltd
Licensed under the GNU Free Documentation License, Version 1.3.