AbstractItemModel to QML Route

大憨熊 提交于 2019-12-02 02:36:30

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!