Hi,

I want to show single image in background of QLabel. If the label size is big(say 640 by 480) and if image size is small (say 64 by 64). then background will show so many no of images.

But I want to show only single image with original size in center.

Can anybody suggest me right way to do this.

I am trying following...

Qt Code:
  1. QLabel label;
  2. QPalette palette;
  3.  
  4. label.setGeometry(0,0,640,480);
  5. QImage img("/home/nirav/img.png");
  6.  
  7. palette.setBrush(label.backgroundRole(), QBrush(img));
  8.  
  9. label.setPalette(palette);
  10.  
  11. label.show();
To copy to clipboard, switch view to plain text mode 

Nirav
"Your suggestion would be a great help for me"