QtFuture::WhenAnyResult Struct
template <typename T> struct QtFuture::WhenAnyResultQtFuture::WhenAnyResult 用于表示QtFuture::whenAny() 的结果。更多内容...
| 标题: | #include <qfuture_impl.h> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Core) target_link_libraries(mytarget PRIVATE Qt6::Core) |
| qmake: | QT += core |
| 鉴于: | Qt 6.3 |
- 所有成员列表(包括继承的成员)
- WhenAnyResult 属于线程类。
公共变量
详细说明
WhenAnyResult<T> 是一个模板结构体,其中T 指定了期货的结果类型。
QtFuture::WhenAnyResult<T> 结构体用于打包未来序列的第一个已完成的QFuture<T> 的副本及其索引,该序列采用未来打包类型T ,并传递给QtFuture::whenAny()。
另请参阅 QFuture 和QtFuture::whenAny()。
成员变量文档
QFuture<T> WhenAnyResult::future
该字段包含第一个已完成的QFuture 的副本,该 封装了类型T ,其中T 是传递给whenAny() 的期货所封装的类型。
另请参阅 QtFuture::whenAny()。
qsizetype WhenAnyResult::index
该字段包含传递给whenAny() 的期货序列中首个已完成的QFuture 的索引。其类型为qsizetype 。
另请参阅 QtFuture::whenAny()。
© 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.