Solved How to export qml map with all of its items into a image?
-
Hi,
I wonder if there is any way to produce an image (which can save on disk) out of a map qml component with all of its items.
Map { id: map zoomLevel: (maximumZoomLevel - minimumZoomLevel)/2 center { // The Qt Company in Oslo latitude: 59.9485 longitude: 10.7686 } MapCircle { id: point radius: 1000 color: "#46a2da" border.color: "#190a33" border.width: 2 smooth: true opacity: 0.25 center: locationData.coordinate } ... }
I appreciate any help
-
@Alien
Hi
Its only suggestions as im not QML expert,
so it's more what seen on the forum etc.I was thinking of using
https://doc.qt.io/qt-5/qml-qtquick-item.html#grabToImage-method
but im not sure if map supports it.
else something like
https://stackoverflow.com/questions/21307773/taking-screenshot-from-inside-fullscreen-qt-quick-application -
Hi
Would a screen shot do it for you ? -
Dear @mrjj
Thanks for your reply what i mean is exporting the current view of map component with all of its items something similar to screenshot. Screenshot takes photo of the screen which is not adequate for my purpose due to the fact that it takes other components which aren't relevant. Having said that, if there is no way to capture the map component and export it, any suggestion about taking screenshot will be appreciated. -
@Alien
Hi
Its only suggestions as im not QML expert,
so it's more what seen on the forum etc.I was thinking of using
https://doc.qt.io/qt-5/qml-qtquick-item.html#grabToImage-method
but im not sure if map supports it.
else something like
https://stackoverflow.com/questions/21307773/taking-screenshot-from-inside-fullscreen-qt-quick-application -
Dear @mrjj
Thanks a lot that was exactly what I'm looking for.Yours,