summaryrefslogtreecommitdiffstats
path: root/examples/animation/stickman/graphicsview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/animation/stickman/graphicsview.cpp')
-rw-r--r--examples/animation/stickman/graphicsview.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/animation/stickman/graphicsview.cpp b/examples/animation/stickman/graphicsview.cpp
index e83a6e10f2..a42dd1600b 100644
--- a/examples/animation/stickman/graphicsview.cpp
+++ b/examples/animation/stickman/graphicsview.cpp
@@ -54,4 +54,7 @@ void GraphicsView::keyPressEvent(QKeyEvent *e)
emit keyPressed(Qt::Key(e->key()));
}
-
+void GraphicsView::resizeEvent(QResizeEvent *event)
+{
+ fitInView(scene()->sceneRect());
+}