1

I'm trying to modify ma pyQgis2 code to run in pyqgis3. That is custom application, that shows canvas with appropriate layers and settings and I can't refresh canvas with pyqgis3.

pyqgis2 code that did the work:

ms=canvas.mapSettings() render = QgsMapRenderer() canvas.refresh() canvas.zoomScale(10000) canvas.refresh() canvas.show()

pyqgis3 I tried:

ms=canvas.mapSettings() render = canvas.refreshAllLayers() canvas.refresh() canvas.zoomScale(10000) canvas.refresh() canvas.show()

I get empty canvas window instead of rendered map window. And python freezes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.