I try to set the background of a widget to an image as indicated in Assistant in the
Porting to QT4 of setPaletteBackgroundPixmap :
Qt Code:
  1. QWidget *widget = new QWidget;
  2. QPixmap pixmap(":/images/bArchi.png");
  3. QPalette palette;
  4. palette.setBrush(widget->backgroundRole(), QBrush(pixmap));
  5. widget->setPalette(palette);
  6. setCentralWidget(widget);
To copy to clipboard, switch view to plain text mode 

I played around with many combinations of the above code, but nothing will show my
image. The background remains unchanged...