QRunnable Class | Qt 4.8 (original) (raw)
The QRunnable class is the base class for all runnable objects. More...
| Header: | #include |
|---|---|
| Since: | Qt 4.4 |
Public Functions
See also QThreadPool.
Member Function Documentation
QRunnable::QRunnable()
Constructs a QRunnable. Auto-deletion is enabled by default.
See also autoDelete() and setAutoDelete().
[virtual] QRunnable::~QRunnable()
QRunnable virtual destructor.
bool QRunnable::autoDelete() const
Returns true is auto-deletion is enabled; false otherwise.
If auto-deletion is enabled, QThreadPool will automatically delete this runnable after calling run(); otherwise, ownership remains with the application programmer.
See also setAutoDelete() and QThreadPool.
[pure virtual] void QRunnable::run()
Implement this pure virtual function in your subclass.
void QRunnable::setAutoDelete(bool autoDelete)
Enables auto-deletion if autoDelete is true; otherwise auto-deletion is disabled.
If auto-deletion is enabled, QThreadPool will automatically delete this runnable after calling run(); otherwise, ownership remains with the application programmer.
Note that this flag must be set before calling QThreadPool::start(). Calling this function after QThreadPool::start() results in undefined behavior.
See also autoDelete() and QThreadPool.
© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.