이것은 페이지 Serialize existing non-generated QObject using QtProtobuf
를 삭제할 것입니다. 다시 한번 확인하세요.
It's possible to serialize non-generated QObject using QtProbuf serializer. Few preconditions should be applied to the QObject-inherited class:
#include <qprotobufobject.h> //Include QtProtobuf macro definitions
class MyCustomObject : public QObject
{
Q_OBJECT
Q_PROTOBUF_OBJECT //Manually add QtProtobuf object definition
Q_DECLARE_PROTOBUF_SERIALIZERS(MyCustomObject) //Manually define QtProtobuf serializers
Q_PROPERTY(QString protoProperty READ protoProperty WRITE setProtoProperty NOTIFY protoPropertyChanged)
...
};
const std::unordered_map<int, int> MyCustomObject::propertyOrdering = {{1/*field number according .proto file*/,
1/*property number, starts from 1*/},
...};
이것은 페이지 Serialize existing non-generated QObject using QtProtobuf
를 삭제할 것입니다. 다시 한번 확인하세요.