For posterity and because Google return this as the first result, the solution is to edit the widget palette with a brush using a QImage as "stamp".

Qt Code:
  1. QPalette p = palette();
  2. QBrush brush = QBrush(generateMyQImage());
  3. p.setBrush(QPalette::Base, brush);
  4. p.setBrush(QPalette::Window, brush);
  5. setPalette(p);
  6. setAutoFillBackground(true);
To copy to clipboard, switch view to plain text mode