Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

MapCircle QML Type - problem to create it dinamically



  • Hi. I want to create mapcircle on a map dinamically. Here is the code :

    var component = Qt.createComponent("mapcircle.qml")
    var circle = component.createObject(myMap, {});
    myMap.addMapItem(circle)
    }

    mapcircle.qml

    import QtQuick 2.0
    import QtLocation 5.6

    MapCircle { center { latitude: 0; longitude: 0 } radius: 5000.0; color: 'green'; border.width: 3}

    Does anybody know how can i do this as this code doesn't work. but the way of creation works for the Recangle and other object.


Log in to reply