I have a signal plot with a grid where I would like to change the background color of just some of the grid cells.
Tried this:
{
bpColor.setNamedColor("grey");
painter->setPen(bpColor);
QwtPainter::drawRect(painter,
500,
500,
100,
500);
}
void SignalView::paintEvent(QPaintEvent*)
{
QPainter* painter = new QPainter(this);
QColor bpColor;
bpColor.setNamedColor("grey");
painter->setPen(bpColor);
QwtPainter::drawRect(painter, 500, 500, 100, 500);
}
To copy to clipboard, switch view to plain text mode
But no paint and the message QPaintDevice: Cannot destroy paint device that is being painted appears in the application output window.
Any suggestions are welcome.
Bookmarks