QDefaultTaskAdapter Class

template <typename Task> class QDefaultTaskAdapter

A class template providing default task adapter used in QCustomTask. 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
Status: Technical Preview

Note: All functions in this class are reentrant.

Detailed Description

The QDefaultTaskAdapter adapting Task may be used when the following conditions are met:

  1. The Task is derived from QObject.
  2. The Task has public start() method that starts the task.
  3. The Task emits done(QtTaskTree::DoneResult) or done(bool) signal when it's finished.

If any of these conditions isn't met, you should provide your custom Adapter type adapting the Task type, to the QCustomTask<Task, Adapter> class template.