I would like to change the background colour of a QGIS project using python.
I can change the colour using the GUI via the Project Properties dialog:
However, I cannot find the equivalent setting in the Python API. I have tried setting the canvas colour using iface.mapCanvas().setCanvasColor()
, but the colour change does not stay after the project file is saved, and reopened again layer.