Qt中QObject禁止operator=重载
比如我设计一个类(直接从项目中粘过来了,主要看有没有继承自QObject)
点击查看代码
class RecipePointConfig:QObject
{
Q_Object
public:
explicit RecipePointConfig(QObject*parent=nullptr);
// JSON序列化
QJsonObject toJson() const;
bool fromJson(const QJsonObject& obj);
public:
QString m_recipeName; // 工艺名称
QString m_description; // 工艺描述
QVector<RecipePoint> m_points; // 工作点位列表
};
点击查看代码
RecipePointConfig a;
RecipePointConfig b;
a=b;
浙公网安备 33010602011771号