Can more than one QgsPalLayerSettings object be defined for a single vector layer? For a line layer, I would like to put some text above the line, then some text below the line, not sure if this is possible or how

  • 1
    I do not think multiple QgsPalLayerSettings can be used for a single layer. One potential method could be to use rule-based labelling with one rule having the text above the line, the other rule having the text below the line. Unfortunately, it doesn't seem currently possible as I asked a question for this a while ago not it hasn't been exposed to the API yet. I think the only workaround is to duplicate your layer and set each of their labelling properties independtly :)
    – Joseph
    Jul 13 '17 at 11:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.