How to create this object dynamically?
Unsolved
QML and Qt Quick
-
Hi. I would like to dynamically create MapQuickItem, but I can't. My code:
anotherItem = Qt.createQmlObject('import QtLocation 5.15; MapQuickItem {sourceItem: Image { id: xyz; source: "qrc:/abc.png"}}', map)
I get error:
Image is not a type
@qwe3 Isn't "import QtQuick 2.0" missing in your QML string?
https://doc.qt.io/qt-5/qml-qtquick-image.html