QtTaskTree::QDefaultTaskAdapter Class
template <typename Task> class QtTaskTree::QDefaultTaskAdapterUn modello di classe che fornisce un adattatore di attività predefinito utilizzato in QCustomTask. Per saperne di più...
| Intestazione: | #include <qtasktree.h> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS TaskTree) target_link_libraries(mytarget PRIVATE Qt6::TaskTree) |
| qmake: | QT += tasktree |
| A partire da: | Qt 6.11 |
| Stato: | Anteprima tecnologica |
Questa classe è in anteprima tecnologica ed è soggetta a modifiche.
Nota: tutte le funzioni di questa classe sono rientranti.
Descrizione dettagliata
QDefaultTaskAdapter<Task> è una classe template in cui Task specifica il tipo di task da adattare.
L'adattatore QDefaultTaskAdapter che adatta Task può essere utilizzato quando sono soddisfatte le seguenti condizioni:
- Il Task deriva da ` QObject`.
- Il Task dispone di un metodo pubblico start() che avvia il task.
- Il Task emette il segnale done(QtTaskTree::DoneResult) o done(bool) al termine dell'esecuzione.
Se una qualsiasi di queste condizioni non è soddisfatta, è necessario fornire un tipo di adattatore personalizzato che adatti il tipo di Task al modello di classe ` QCustomTask<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.