[QGIS-Developer] Editing rule based labeling with the new QGIS3 python API

Martin Dobias wonder.sk at gmail.com
Sun Feb 4 05:15:47 PST 2018


On Sun, Feb 4, 2018 at 1:36 PM, Dominique Lyszczarz <domlysz at gmail.com> wrote:
>
> I have another question : after settings some labeling rules with pyqgis,
> the labels are not displaying but if I just enter the rule settings through
> the gui and directly exit it without changing anything then the labels are
> displayed correctly. Is there any register action needed for each rule that
> I forgot in my code ?

It is hard to say without seeing a code snippet that I could run
myself. Does it help if you force map refresh (e.g. by moving the map
a bit or zooming in/out)? It is also worth playing with "simple"
labeling in pyqgis first as that might help you understand whether it
is just a problem of rule-based labeling or it applies to simple
labeling as well.

Cheers
Martin


More information about the QGIS-Developer mailing list