QCustomPlot Discussion and Comments

Backround Color QCPLayoutElementReturn to overview

I'm trying to add some text to my layout grid.
I added a QCPPlotTitle Element to the layout and I would like to color the background. This seems to only have the "setTextColor" method but no brush/background.

I am aware that QCPItemText has a brush property, although it is not a QCPLayoutElement thus it cannot be nested in the layout.


Any idea how to do so?

Did you try to create a widget, let's call it a "wrapper", in which you put another widget, the "background", and then the QCPPlotTitle in it?

I don't use the QCPPlotTitle in my project but that's what I did to have a background behind my plot: I have a Wrapper with a Background Layer and a Plot Layer.