FelixB
28th January 2011, 11:31
Hi,
I want to change the background color of a QwtPlot. The method "setCanvasBackground" changes only the background color of the canvas. How can I change the color "under" the scales and the labels (this is normally gray)?
I tried the following snippet with no effect...
QPalette p = plot->palette();
p.setColor(QPalette::Window, background);
plot->setPalette(p);
if I remove "plot->" in the snippet, it works for my whole widget (including toolbar and statusbar). How can I change the color only in QwtPlot widget?
thanks!
Felix
I want to change the background color of a QwtPlot. The method "setCanvasBackground" changes only the background color of the canvas. How can I change the color "under" the scales and the labels (this is normally gray)?
I tried the following snippet with no effect...
QPalette p = plot->palette();
p.setColor(QPalette::Window, background);
plot->setPalette(p);
if I remove "plot->" in the snippet, it works for my whole widget (including toolbar and statusbar). How can I change the color only in QwtPlot widget?
thanks!
Felix