hi,

I have a problem when i try to load a background image in a QMainWindow.
i override the paintevent method with the next code:
Qt Code:
  1. void MainWindow::paintEvent(QPaintEvent *pe)
  2. {
  3.  
  4. QPainter* pPainter = new QPainter(this);
  5. pPainter->drawPixmap(rect(), QPixmap(":/images/metal.png"));
  6. delete pPainter;
  7. QWidget::paintEvent(pe);
  8.  
  9. }
To copy to clipboard, switch view to plain text mode 

I think the code is ok, but i am not sure!!! It doesnt load any bg image.
the image size has to match with mainwindow size?
any ideas??
thank you.