I've viewed a lot of drawing examples online but I'm still struggling to work out the best way to simply fill screen with one colour in the simplest possible way. (Literally every pixel set one colour, no window bar, no more.)

I'd like to use QPainter because that would give me a starting point to go on to do some drawing. However I'm wondering if using QSplashScreen might be a *very* quick way to simply fill the screen.

Something like this?

Qt Code:
  1. int main(int argc, char *argv[])
  2. {
  3. QApplication app(argc, argv);
  4. QPixmap pixmap(100, 100);
  5. pixmap.fill(Qt::white);
  6. QSplashScreen *splash = new QSplashScreen(pixmap);
  7. splash->setPixmap( pixmap );
  8. splash->show();
  9. return app.exec();
  10. }
To copy to clipboard, switch view to plain text mode 

Can someone suggest a better method or even better post some example code.