Skip to main content
clarified title
Link
Ian Turton
  • 83.2k
  • 6
  • 89
  • 189

How to set background textcolor of label using PyQGIS 3?

edited tags
Link
Ayato
  • 162
  • 1
  • 10
Source Link
Ayato
  • 162
  • 1
  • 10

How to set background text of label using PyQGIS 3?

suppose I have a shapefile that have an attribute, and I want that attribute to be shown with white background behind the text in the viewport.

This is what I want to accomplish:

labels with white background

I've searched the internet and tried this: https://gis.stackexchange.com/a/277111/51131 but it only shows the labels without the background.