From QGIS 3.14 you can use html style coloring in labels. So something
like this should work:
"name" || ' <font color="#ff0000">(' || "number" || ')</font>'
You need to check "Allow HTML formatting" in the label settings.
Raymond
On 27-08-2020 15:28, Grün, Michael wrote:
Hi all,
Very simple example:
I have a point layer and I want to label it with 2 attributes (name,
number) and differ them within their styles.
Cologne (10)
Hamburg (14)
name || ' ' || '(' || "number" || ')'
Now I just want for more difference the number (and brackets) in another
colour (or style, bold e.g.).
Cologne *(10)*
Hamburg *(14)*
I tried it with the button „data devided override“ – but changes always
for both attributes, no difference within.
I tried rule-based labeling – without result.
Allow HTML formatting <b>number</b>, but how?
Actually I thought this would be very simple…any hints?
Thanx a lot…kindly regards, Michael
_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user