Qt Protobuf Well-Known Types C++ Classes
Qt Protobuf Well-Known Types モジュールは、Well-Known Typesパッケージで利用可能な型の一部をサポートしている。詳細...
このモジュールは Qt 6.6 で導入されました。
クラス
protobuf Any 型を簡単に扱うためのヘルパークラスです。 |
詳しい説明
QtProtobufWellKnownTypes には、以下のProtobuf Well-Known 型が含まれています:サポートされている型
- Any(メッセージ)
- Api(メッセージ)
- BoolValue(メッセージ)
- BytesValue(メッセージ)
- DoubleValue(メッセージ)
- Duration(メッセージ)
- Empty(メッセージ)
- Enum(メッセージ)
- EnumValue(メッセージ)
- Field(メッセージ)
- フィールド.カーディナリティ(enum)
- Field.Kind(enum)
- FieldMask(メッセージ)
- FloatValue(メッセージ)
- Int32Value(メッセージ)
- Int64Value(メッセージ)
- ListValue(メッセージ)
- メソッド(メッセージ)
- Mixin(メッセージ)
- NullValue(enum)
- Option(メッセージ)
- ソースコンテキスト(メッセージ)
- 文字列値(メッセージ)
- 構造体(メッセージ)
- 構文(enum)
- タイムスタンプ(メッセージ)
- 型(メッセージ)
- UInt32Value(メッセージ)
- UInt64Value(メッセージ)
- 値(メッセージ)
プロジェクトでWellKnown型を使用するには、対応するgoogle .protoファイルをインターフェイスに含めることができます:
syntax = "proto3"; package somepackage; import "google/protobuf/any.proto"; message Message { google.protobuf.Any payload = 1; }
リストされている型を使用するには、CMakeLists.txtファイルに以下の行を追加して、QtProtobuf WellKnownTypes ライブラリとリンクする必要があります:
target_link_libraries(YourTargetName PRIVATE Qt::ProtobufWellKnownTypes)
© 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.