I have layer for comments in qgis, symbology style is rule based with Geometry generator.

enter image description here

Problem is with displaying name in layers tab because the line before text is too long

enter image description here

How do I solve the problem so that the line was as short as on all other layers?

  • It looks like you're using geometry generator to create the leading line for the label, QGIS not has native support for leading lins within label settings, have you tried using this instead of the geometry generator? Jan 20 '20 at 14:40
  • I'm sorry but I don't understand the question, i need that leading line, is there any other way to get same effekt with label.
    – Goran
    Jan 20 '20 at 14:51
  • Yes there is, see my answer below. Jan 20 '20 at 15:00

Instead of creating the leading lines using geometry generator symbology, try using the Callouts tab in the Label options:

enter image description here

You can configure the leading lines with the options shown in the screenshot. It may take some configuring to make them look the same as they were in the geometry generator but doing it this way won't show up in the table of contents or legend.

  • 1
    Keep in mind this feature was added to QGIS 3.10. See qgis.org/en/site/forusers/visualchangelog310/…. It is not available in previous versions like the current LTR 3.4.
    – MrXsquared
    Jan 21 '20 at 1:14
  • Thanks, that solved my problem, yes I am using qgis 3.4 and didn't know about this great new feature in QGIS 3.10
    – Goran
    Jan 21 '20 at 19:37

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.