summaryrefslogtreecommitdiffstats
path: root/examples/animation
diff options
context:
space:
mode:
authorLeonardo Sobral Cunha <leo.cunha@nokia.com>2009-09-02 18:34:50 +0200
committerLeonardo Sobral Cunha <leo.cunha@nokia.com>2009-09-02 18:36:29 +0200
commit8454e08b44df3b5364f4c9d8c9810456902dc88b (patch)
treee09110e69d0ef03e64125fd003a147c58c56b384 /examples/animation
parente4dfcd4392e5be1b5de8648fc20ff45f7faa30ca (diff)
Stickman: increases the view size for making room for jumping & dying
Reviewed-by: ogoffart
Diffstat (limited to 'examples/animation')
-rw-r--r--examples/animation/stickman/main.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/examples/animation/stickman/main.cpp b/examples/animation/stickman/main.cpp
index 872ef6f217..799f45cc85 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");