Hi everyone,

I created a QMainWindow app using Qt Creator 2.4.1 and Qt SDK 1.2.1. The app only have a QScrollArea. In the QMainWindow constructor I did:

Qt Code:
  1. QPalette palette;
  2. QString appdir = QApplication::applicationDirPath();
  3.  
  4. QImage imgfondo;
  5.  
  6. imgfondo.load( appdir + "/imagenes/fondo_aplicacion.jpg" );
  7. palette.setBrush( this->backgroundRole(), QBrush(imgfondo) );
  8. this->setPalette( palette );
  9. this->resize( imgfondo.width(), imgfondo.height() );
To copy to clipboard, switch view to plain text mode 

The image "fondo_aplicacion.jpg" is 1000 x 800 pixel image.

The scrollarea is inside MainWindow with no special values. I just dragged the QScrollArea object and dropped inside the form (using Qt Designer).

When I run the app the background image is ok on MainWindow but in the scrollarea the background image is not ok, It was like the background image is repainted again inside it. When I run the app I get this:

Screenshot from 2012-08-19 00:49:47.jpg

Actually, I try to find how the draw works over widgets, because if I use a QFrame instead of QScrollArea there's no problem.

Thanks to anyone who try to help.