AbstractItemModel to QML Route

前端 未结 1 352
忘了有多久
忘了有多久 2021-01-21 09:51

I have a set of QPointF in MarkerModel which subclasses from AbstractListModel. Each such marker have a status, depending on which they ar

相关标签:
1条回答
  • 2021-01-21 10:00

    If you source MapRoute from a RouteModel through a MapItemView, you always assign routeData to route. routeData is the role that RouteModel exposes, to let you access the Route elements.

    Now, for your specific case, it seems that MapRoute is unsuitable. The best approach seems to me to have 2 separate models: one exposing one js array per row, that you assign to the path property of a MapPolyline delegate, and one exposing one QGeoCoordinate per row (so many more rows), that you will use with a MapCircle or a MapQuickItem delegate

    0 讨论(0)
提交回复
热议问题