I am using Qgis 1.7 and I want to refresh the mapcanvas so I am using refresh() function of QgsMapcanvas class and Nothing is happening to the Map Canvas. I am using Python for customizing

2 Answers 2


I use


in Time Manager plugin and it works. You can check the source on Github.


In QGis 2.16, with refresh() still nothing is happening. I use this command to refresh all layers:

  • 1
    To expand on this .refresh() "Repaints the canvas map" whereas .refreshAllLayers() will "Reload all layers, clear the cache and refresh the canvas" - from the docs
    – Jonny
    Commented Mar 21, 2019 at 18:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.