QtFuture::WhenAnyResult Struct

template <typename T> struct QtFuture::WhenAnyResult

QtFuture::WhenAnyResult 用于表示 () 的结果。QtFuture::whenAny更多

头文件: #include <WhenAnyResult>
CMake: find_package(Qt6 REQUIRED COMPONENTS Core)
target_link_libraries(mytarget PRIVATE Qt6::Core)
qmake: QT += core
Qt 6.3

公共变量

QFuture<T> future
qsizetype index

详细说明

QtFuture::WhenAnyResult<T> 结构用于打包副本,以及在传递给QtFuture::whenAny() 的期货打包类型T 序列中第一个完成的QFuture<T> 的索引。

另请参阅 QFutureQtFuture::whenAny() 。

成员变量文档

QFuture<T> WhenAnyResult::future

该字段包含第一个完成的QFuture 的副本,该 封装了T 类型,其中T 是传递给whenAny() 的期货所封装的类型。

另请参阅 QtFuture::whenAny() 。

qsizetype WhenAnyResult::index

该字段包含传给whenAny() 的期货序列中第一个完成的QFuture 的索引。它的类型是qsizetype

另请参阅 QtFuture::whenAny() 。

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