A casual glance at the documentation for QGraphicsView would show you that there is a setSceneRect() method...