QtTaskTree::QSyncTask Class

class QtTaskTree::QSyncTask

Synchronously executes a custom handler between other tasks. More...

Header: #include <qtasktree.h>
CMake: find_package(Qt6 REQUIRED COMPONENTS TaskTree)
target_link_libraries(mytarget PRIVATE Qt6::TaskTree)
qmake: QT += tasktree
Since: Qt 6.11
Inherits: QtTaskTree::ExecutableItem
Status: Technical Preview

Note: All functions in this class are reentrant.

Detailed Description

QSyncTask is useful when you want to execute an additional handler between other tasks. QSyncTask is seen by its parent Group as any other task. Avoid long-running execution of the QSyncTask's handler body, since it is executed synchronously from the caller thread. If that is unavoidable, consider using QThreadFunctionTask instead.