[QGIS-Developer] triggerRepaint()

Nyall Dawson nyall.dawson at gmail.com
Thu Mar 26 15:10:00 PDT 2020


On Thu, 26 Mar 2020 at 00:44, Luca Manganelli
<luca.manganelli at comune.trento.it> wrote:
>
> Hello,
>
> I discovered that triggerRepaint() is working on:
>
>   QgsMapCanvas.currentLayer()
>
> but NOT in one of the layers in:
>
>   QgsProject.instance().layers()
>
> I use triggerRepaint to force the update in the mapcanvas, after a Postgis sql INSERT query.
>
> Is there another way to do this?

No - this approach is correct and should work. Can you share a
complete self-contained example?

Nyall


More information about the QGIS-Developer mailing list