Qt Protobuf Well-Known Types C++ Classes

Le module Qt Protobuf Well-Known Types fournit un support pour certains des types disponibles dans le paquet Well-Known Types. Plus d'informations...

Ce module a été introduit dans Qt 6.6.

Classes

QtProtobuf::Any

Une classe d'aide pour simplifier le travail avec le type protobuf Any

Description détaillée

QtProtobufWellKnownTypes contient les types Protobuf connus suivants : Types pris en charge :

Pour utiliser un type bien connu dans votre projet, vous pouvez inclure le fichier google .proto correspondant dans votre interface :

syntax = "proto3";
package somepackage;
import "google/protobuf/any.proto";
message Message {
    google.protobuf.Any payload = 1;
}

Pour utiliser les types listés, vous devez créer un lien avec la bibliothèque QtProtobuf WellKnownTypes en ajoutant la ligne suivante à votre fichier CMakeLists.txt:

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.