A.H.M. Mahfuzur Rahman
9th August 2009, 12:54
I have implemented the drawBackground() funciton of QGraphicsScene to draw a background from a pixmap image. Here is what I have done:
void GraphicsScene::drawBackground(QPainter* painter, const QRectF &rect){
painter->drawPixmap( 0, 0,
renderBackground( sceneRect().size().toSize() , false ));
}
Here rendereBackground( QSize& Mapsize, true) returns a pixmap of size Mapsize and it is working correctly.
But, the background image is not covering the full background
What should be the problem??
Thank You
Mahfuz
void GraphicsScene::drawBackground(QPainter* painter, const QRectF &rect){
painter->drawPixmap( 0, 0,
renderBackground( sceneRect().size().toSize() , false ));
}
Here rendereBackground( QSize& Mapsize, true) returns a pixmap of size Mapsize and it is working correctly.
But, the background image is not covering the full background
What should be the problem??
Thank You
Mahfuz