1#include "GraphicsView.h" 
    7  void GraphicsView::resizeEvent(QResizeEvent *event) {
 
    8    if(event->oldSize().isEmpty()) {
 
    9      QRectF sceneRect(scene()->itemsBoundingRect());
 
   10      fitInView(sceneRect, Qt::KeepAspectRatio);
 
This is free and unencumbered software released into the public domain.