Hi All,
How can I set my QwtPlot's canvas as transparent? I want to see all my running curves and canvas background in same screen. My settings like that;
plotHandle
->canvas
()->setPaintAttribute
(QwtPlotCanvas::BackingStore,
true);
plotHandle
->canvas
()->setPaintAttribute
(QwtPlotCanvas::Opaque,
false);
QPalette palette
= plotHandle
->canvas
()->palette
();
privateData.
plotHandle->canvas
()->setBackgroundRole
(QPalette::Window);
privateData.plotHandle->canvas()->setPalette(palette);
privateData.plotHandle->canvas()->setAutoFillBackground(false);
plotHandle->canvas()->setPaintAttribute(QwtPlotCanvas::BackingStore, true);
plotHandle->canvas()->setPaintAttribute(QwtPlotCanvas::Opaque, false);
QPalette palette = plotHandle->canvas()->palette();
palette.setBrush(QPalette::Window, QBrush(QColor(0, 0, 0, 0)));
privateData.plotHandle->canvas()->setBackgroundRole(QPalette::Window);
privateData.plotHandle->canvas()->setPalette(palette);
privateData.plotHandle->canvas()->setAutoFillBackground(false);
To copy to clipboard, switch view to plain text mode
But my canvas seem not transparent until I set the BackingStore attribute to false.
This time I can see background of canvas but replot function doesn't work and my curves draw's the same screen in overlapped way without cleaning the canvas.
How can I make my canvas transparent?
Thanks in advance.
Bookmarks