Ok, I'm missing something simple here. For some reason, QPainter isn't displaying anything. I thought this code should simply fill the background of the scene with blue. Any ideas? This is the entirety of my code:

Qt Code:
  1. #include <QtGui>
  2.  
  3. int main(int argc, char **argv){
  4. QApplication app(argc, argv);
  5. view.setScene(&scene);
  6.  
  7. QPainter painter;
  8.  
  9. QRectF sceneRect = scene.sceneRect();
  10. painter.fillRect(sceneRect, Qt::blue);
  11.  
  12. view.show();
  13. return app.exec();
  14. }
To copy to clipboard, switch view to plain text mode