The QGrpcCallReply class implements logic to handle gRPC calls from the gRPC client side. 更多...
头: | #include <QGrpcCallReply> |
CMake: |
find_package(Qt6 REQUIRED COMPONENTS Grpc)
target_link_libraries(mytarget PRIVATE Qt6::Grpc) |
Since: | Qt 6.5 |
继承: | QGrpcOperation |
状态: | 技术预览 |
void | subscribe (QObject * receiver , Func1 && finishCallback , Func2 && errorCallback , Qt::ConnectionType type = Qt::AutoConnection) |
void | subscribe (QObject * receiver , Func1 && finishCallback , Qt::ConnectionType type = Qt::AutoConnection) |
The QGrpcCallReply object is owned by the client object that created it.
Convenience function to connect the finishCallback and errorCallback of receiver to the QGrpcCallReply::finished and the QGrpcCallReply::errorOccurred signals with the given connection type .
Calling this function is equivalent to the following:
QObject::connect(this, &QGrpcCallReply::finished, receiver, std::forward<Func1>(finishCallback), type); QObject::connect(this, &QGrpcCallReply::errorOccurred, receiver, std::forward<Func2>(errorCallback), type);
Convenience function to connect the finishCallback of receiver to the QGrpcCallReply::finished signal with given connection type .
Calling this function is equivalent to the following:
QObject::connect(this, &QGrpcCallReply::finished, receiver, std::forward<Func1>(finishCallback), type);