PDA

View Full Version : put image on scenerect



dreamer
12th May 2008, 21:53
How can i put an image on a scenerect? The image wouldn't be repeated to cover the entire canvas, but, if smaller, the image would be enlarged.

I use
setBackgroundBrush(QImage(fileImage));

but the image, if smaller, is repeated.........

wysota
12th May 2008, 22:30
Reimplement QGraphicsScene::drawBackground().

dreamer
12th May 2008, 23:35
in which manner?

wysota
13th May 2008, 06:55
Draw the image as you want it there.