PythonQt.Qt.QRunnable
QRunnable
PythonQtInstanceWrapper object
Native bases: PythonQtInstanceWrapper
Supplemental documentation: Qt 5 reference:
Detailed Description
The QRunnable class is an interface for representing a task or piece of code that needs to be executed, represented by your reimplementation of the run() function.
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.
Source: https://doc.qt.io/archives/qt-5.15/qrunnable.html
Complete member index
Every captured member retains its own identity. Identical captured declaration text is linked once; this does not establish native inheritance or interchangeable objects.
| Member | Kind | Signature | Summary |
|---|---|---|---|
__init__ |
function | (self, *args: Any, **kwargs: Any) -> None |
Native constructor; consult class documentation for supported overloads. (shared captured text) |
autoDelete |
function | (self) -> bool |
X.autoDelete() -> bool (shared captured text) |
className |
function | (self, *args: Any, **kwargs: Any) -> Any |
Return the classname of the object (shared captured text) |
delete |
function | (self, *args: Any, **kwargs: Any) -> Any |
Deletes the C++ object (at your own risk, my friend!) (shared captured text) |
help |
function | (self, *args: Any, **kwargs: Any) -> Any |
Shows the help of available methods for this class (shared captured text) |
inherits |
function | (self, *args: Any, **kwargs: Any) -> Any |
Returns if the class inherits or is of given type name (shared captured text) |
run |
function | (self) -> None |
Implement this pure virtual function in your subclass. (shared captured text) |
setAutoDelete |
function | (self, _autoDelete: bool) -> None |
Enables auto-deletion if autoDelete is true; otherwise auto-deletion is disabled. (shared captured text) |