Thanks for your reply Uwe. Yes, I want to have the image as background of the main window.

I've tried to overload paintEvent methods this way:
Qt Code:
  1. void BarChart::paintEvent(QPaintEvent *)
  2. {
  3. QPainter painter(this);
  4. painter.setBackgroundMode(Qt::TransparentMode);
  5. }
To copy to clipboard, switch view to plain text mode 
Qt Code:
  1. void MainWindow::paintEvent(QPaintEvent *)
  2. {
  3. QPainter painter(this);
  4. QPixmap bkgnd(":/files/image.png");
  5. painter.drawPixmap(QPoint(0,0), bkgnd);
  6. }
To copy to clipboard, switch view to plain text mode 

But the output is:
img.JPG