Why the Qgraphicsscene has drawbackground event ?????
This is the kind of things I dont understand.
As you can read on reference :
Quote:
Note that QGraphicsScene has no visual appearance of its own; it only manages the items. You need to create a QGraphicsView widget to visualize the scene.
But You have :
Quote:
void QGraphicsScene::drawBackground ( QPainter * painter, const QRectF & rect ) [virtual protected]
Draws the background of the scene using painter, before any items and the foreground are drawn. Reimplement this function to provide a custom background for the scene.
All painting is done in scene coordinates. The rect parameter is the exposed rectangle.
If all you want is to define a color, texture, or gradient for the background, you can call setBackgroundBrush() instead.
See also drawForeground() and drawItems().
??????
Any explanation ?
Re: Why the Qgraphicsscene has drawbackground event ?????
Please download Qt sourcecode, unpack it and have a look at what QGraphicsView::drawBackground() and QGraphicsScene::drawBackground() look like.