PDA

View Full Version : setBackgroundBrush Question



qtuser20
10th August 2009, 12:45
Hi

I am loading an image into an application and using setBackgroundBrush to achieve this.However, the image appears tiled.Is there any other method to load the image, without having the tiled appearance ?

Thanks

yogeshgokul
10th August 2009, 12:53
Can you tell, how you are loading.

qtuser20
10th August 2009, 13:05
curpixmap.load(fileName);
scene->setBackgroundBrush(QBrush(curpixmap));

yogeshgokul
10th August 2009, 13:22
curpixmap.load(fileName);
scene->setBackgroundBrush(QBrush(curpixmap));Ok, this is clear, your scene is fixed size and bigger than the size of pixmap. So pixmap has to adjust like that.
Either change your scene size according to pixmap size or, use bigger image.