Qt 6.11 is out! See what's new in the release
blog
Access QML MapType in c++
-
Hi
I need to access and store a QML Maptype variable in c++. How do I store this type? I am able to store individual properties of the maptype in lists but is it possible to store as it is with out using user defined types?
-
-
Also, How do I access the activeMapType for a qml map. I have accessed the map from c++ in the following way.
QQuickItem *item = widget->rootObject()->findChild<QQuickItem*>("map_main");and I am trying to set the property of the map like this
item->setProperty("activeMapType",maptype.name) ;Is it the right way because I am not able to access the current active maptype also via
x= item->property("activeMapType.name").toString();