[QGIS-Developer] Has setBackgroundEnabled been deprecated from QgsLayoutItemLabel?
afernandez
afernandez at odyhpc.com
Sat Nov 30 08:37:46 PST 2024
Hello,
I'm using QgsLayoutItemLabel in a print layout. Everything works fine but
I'd like some of the texts to have a solid background. I tried the solution
posted at
https://gis.stackexchange.com/questions/424164/how-to-make-backgrounds-white-for-qgslayoutitems-in-qgis-python-console
by adding the lines:
custom_text.setBackgroundEnabled(True)
custom_text.setBackgroundColor(QColor(Qt.black))
This didn't make any difference, which is understandable as the user's
guide doesn't include these methods among those of QgsLayoutItemLabel. I
really don't know if the post is just wrong (the final comment suggests
that the proposed solution worked) or if setBackgroundEnabled has been
deprecated. Any thoughts on whether this feature was included or will be
included in future versions?
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20241130/1861586d/attachment.htm>
More information about the QGIS-Developer
mailing list