开发基于Json的Qt应用
发布时间
阅读量:
阅读量
// 定义一个抽象接口类
#ifndef JSONBASE_H
#define JSONBASE_H
#include<QJsonObject>
class IJsonSerialize
{
public:
IJsonSerialize() = default;
virtual void read( QJsonObject &json) = 0;
virtual void write( QJsonObject &json) = 0;
};
#endif // JSONBASE_H
// 要进行序列化的类,都继承于同样的接口
// 对于复杂字段都要继承并实现其read 和write
#ifndef CAMSETTINGS_H
#define CAMSETTINGS_H
#include<QOb
全部评论 (0)
还没有任何评论哟~
