qtpositioning

QML MapPolygon from C++ model

我的未来我决定 提交于 2020-02-24 06:37:28
问题 I want to dynamically add/remove/edit MapPolygon in QML Map application. I have some others jobs with created polygons (file export/import etc.) so I think that I should use MapItemView with C++ model sotirng Polygons data. I tried to create my own model with my own QObject based objects: Object: class MODELSHARED_EXPORT Polygon : public QObject { Q_OBJECT Q_PROPERTY(QList<QGeoCoordinate> coordinates READ coordinates WRITE setCoordinates NOTIFY coordinatesChanged) public: explicit Polygon

QML MapPolygon from C++ model

醉酒当歌 提交于 2020-02-24 06:37:08
问题 I want to dynamically add/remove/edit MapPolygon in QML Map application. I have some others jobs with created polygons (file export/import etc.) so I think that I should use MapItemView with C++ model sotirng Polygons data. I tried to create my own model with my own QObject based objects: Object: class MODELSHARED_EXPORT Polygon : public QObject { Q_OBJECT Q_PROPERTY(QList<QGeoCoordinate> coordinates READ coordinates WRITE setCoordinates NOTIFY coordinatesChanged) public: explicit Polygon