mmh... in the doc I found that the paintEvent method is reimplemented from QWidget:aintEvent(...). So, I did what I usually do with QWidgets.
painter.
setBrush(QBrush(Qt
::gray));
painter.
drawRect(QRect(0,
0, this
->width
(), this
->height
()));
QPainter painter;
painter.setBrush(QBrush(Qt::gray));
painter.drawRect(QRect(0, 0, this->width(), this->height()));
To copy to clipboard, switch view to plain text mode
Then, I painted the scene, ad I saw this cannot be omitted:
QGraphicsView::paintEvent(event);
To copy to clipboard, switch view to plain text mode
What do you mean by "open the painter"? It seems I'm lacking something...
Thanks for your answer!
Bookmarks