diff options
Diffstat (limited to 'examples/animation/stickman/graphicsview.cpp')
-rw-r--r-- | examples/animation/stickman/graphicsview.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/animation/stickman/graphicsview.cpp b/examples/animation/stickman/graphicsview.cpp index 23036ef..0f7ce5f 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()); +} |