[QGIS-Developer] Editing rule based labeling with the new QGIS3 python API
Dominique Lyszczarz
domlysz at gmail.com
Sun Feb 4 08:31:22 PST 2018
ok I found the solution, it was because I use an expression for labeling
and I had forgotten to set QgsPalLayerSettings().isExpression to True.
Thanks again for your time.
2018-02-04 14:15 GMT+01:00 Martin Dobias <wonder.sk at gmail.com>:
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20180204/801c2dbf/attachment.html>
More information about the QGIS-Developer
mailing list