结构体如下:
typedef struct {
int sequenceNumber;
QString currentAngle;
}CurrentAngleStruct;
使用了 Q_PROPERTY :
Q_PROPERTY(QList<CurrentAngleStruct> CurrentAngleList READ CurrentAngleList NOTIFY CurrentAngleListChanged)
QList<CurrentAngleStruct> CurrentAngleList(){ return m_CurrentAngleList}
定义了 m_CurrentAngleList
private:
QList<CurrentAngleStruct> m_CurrentAngleList
我想要在qml中使用的时候,提示:不能处理未定义的数据类型 'QList' for property ' MissionController::CurrentAngleList'