I have a polygon layer and am using single labels with an expression that creates a three line label using three fields: Label expression: "name" || '\n' || "report" || '\n' || "depth"

For some reason text wrapping is happening for the third line (depth field). The first two lines are not wrapping (name and report fields). I don't want text wrapping. (QGIS version 3.30.2) enter image description here

enter image description here


1 Answer 1


It looks like your depth field has line breaks in the data itself (you can test this by typing "depth" in the Expression Dialog box; you would see the text with line breaks in the Preview section below).

If that is the case, you would need to strip out the linebreaks from the depth field, by using replace("depth",'\n','') instead of just "depth" .

  • 1
    Solved!! Great stuff - that has done the job!!! Thanks!
    – Tom Mackie
    Jan 31 at 1:42

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.