I have a standalone pyqgis program and it uses QgsMapCanvas as map display. I would like to set its extent to be empty. How do I do that?
I tried the following but it is not working, in the sense that the canvas's extent is not empty after setting an empty rect:
r = QgsRectangle() if r.isEmpty(): canvas.setExtent(r)