Qt 6.11 is out! See what's new in the release
blog
Change Path Property of MapPolyline from c++
QML and Qt Quick
1
Posts
1
Posters
1.2k
Views
2
Watching
-
Hi everyone!
I am developing a small App with QtQuick and I want to draw a line for a route into the map. For that I used the MapPolyline:
MapPolyline { id: mapline objectName: "MapLine" path: {[ { latitude: 47.219791, longitude: 9.546032 }, { latitude: 47.219657, longitude: 9.542508 }, { latitude: 47.2194446, longitude: 9.5437876 } ]}It works perfectly, if I define the coordinates directly in QML.
But how can I change the content of the path - property from the c++ file?
Thanks for help!