GrpcChannelOptions QML Type

GrpcChannelOptions 是一个存储类,用于设置额外的通道选项。更多

Import Statement: import QtGrpc
Since: Qt 6.7
In C++: QGrpcChannelOptions

属性

详细说明

提供了一组用于访问通道选项的属性。 gRPC通道用于与服务通信的通道选项。

另请参阅 QGrpcChannelOptions

属性文档

deadlineTimeout : int

为通道设置截止时间值。

另请参阅 QGrpcChannelOptions::deadlineTimeout


metadata : GrpcMetadata

为通道设置元数据对象指针。

另请参阅 GrpcMetadata


serializationFormat : enumeration [since 6.8]

设置通道的序列化格式。默认使用QtGrpc::SerializationFormat::Default 格式。

常量说明
QtGrpc.SerializationFormat.Default默认QGrpcSerializationFormat 预设。该预设会构建一个内容类型后缀为空的QProtobufSerializer
QtGrpc.SerializationFormat.Protobuf嵌入式 protobufQGrpcSerializationFormat 预设值。该预设会构建一个后缀为proto 内容类型的QProtobufSerializer
QtGrpc.SerializationFormat.Json嵌入式 JSONQGrpcSerializationFormat 预设。该预设构建了一个QProtobufJsonSerializer ,后缀为json 内容类型。

此属性在 Qt 6.8 中引入。

另请参阅 QGrpcChannelOptions::serializationFormat,QtGrpc::SerializationFormat, 和QGrpcSerializationFormat


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