このページでは

QtTaskTree::QDefaultTaskAdapter Class

template <typename Task> class QtTaskTree::QDefaultTaskAdapter

QCustomTask で使用されるデフォルトのタスクアダプタを提供するクラステンプレート。詳細...

ヘッダー: #include <qtasktree.h>
CMake: find_package(Qt6 REQUIRED COMPONENTS TaskTree)
target_link_libraries(mytarget PRIVATE Qt6::TaskTree)
qmake: QT += tasktree
以下のように: Qt 6.11
ステータス: テクノロジープレビュー

このクラスはテクノロジープレビュー段階にあり、変更される可能性があります。

注:このクラスのすべての関数は再入可能です。

詳細な説明

QDefaultTaskAdapter<Task> は、Task が適応させるタスクの型を指定するテンプレートクラスです。

Task を適応させる QDefaultTaskAdapter は、以下の条件が満たされる場合に使用できます:

  1. Task がQObject を継承していること。
  2. Task には、タスクを開始する public の start() メソッドがある。
  3. Task は、完了時に done(QtTaskTree::DoneResult) または done(bool) シグナルを発行する。

これらの条件のいずれかが満たされない場合は、QCustomTask<Task, Adapter> クラステンプレートに対して、その Task 型を適応させる独自の Adapter 型を定義する必要があります。

© 2026 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.