19

How can I apply Multiline label option in the label property?

Name field contains a lengthy name. I want to wrap it.

My QGIS version is 1.8.

PolyGeo
  • 65,136
  • 29
  • 109
  • 338
Sreesha
  • 609
  • 2
  • 8
  • 11

2 Answers2

23

If you labels contain a new line character (\n) they will be automatically wrapped. If not you can apply a wrapping character in the Advanced section of the labeling tools

enter image description here

The label will be wrapped on the character supplied. If you want to wrap on space just insert a space.

Nathan W
  • 34,706
  • 5
  • 97
  • 148
22

Since QGIS 2.4 there is very handy new expression builder function called wordwrap that will allow one to automatically wrap a lengthy string using as argument the ideal number of characters that a lime should have and ,optionally, a string delimiter (the default is space).

In the below example the field "sintaxon" is my lengthy values field.

enter image description here

Also notice that I can nest wordwrap several times if I want to use more than one string delimiter. In the example below it uses '-' and the default space.

enter image description here

Alexandre Neto
  • 14,212
  • 2
  • 58
  • 85