diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/animation/stickman/main.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/examples/animation/stickman/main.cpp b/examples/animation/stickman/main.cpp index 872ef6f..799f45c 100644 --- a/examples/animation/stickman/main.cpp +++ b/examples/animation/stickman/main.cpp @@ -84,7 +84,11 @@ int main(int argc, char **argv) view->setScene(scene); view->show(); view->setFocus(); - view->setSceneRect(scene->sceneRect()); + + QRectF sceneRect = scene->sceneRect(); + // making enough room in the scene for stickman to jump and die + view->resize(sceneRect.width() + 100, sceneRect.height() + 100); + view->setSceneRect(sceneRect); LifeCycle *cycle = new LifeCycle(stickMan, view); cycle->setDeathAnimation(":/animations/dead"); |