summaryrefslogtreecommitdiffstats
path: root/examples/animation/stickman
diff options
context:
space:
mode:
authorLeonardo Sobral Cunha <leo.cunha@nokia.com>2009-09-02 16:34:50 (GMT)
committerLeonardo Sobral Cunha <leo.cunha@nokia.com>2009-09-02 16:36:29 (GMT)
commit8454e08b44df3b5364f4c9d8c9810456902dc88b (patch)
treee09110e69d0ef03e64125fd003a147c58c56b384 /examples/animation/stickman
parente4dfcd4392e5be1b5de8648fc20ff45f7faa30ca (diff)
downloadQt-8454e08b44df3b5364f4c9d8c9810456902dc88b.zip
Qt-8454e08b44df3b5364f4c9d8c9810456902dc88b.tar.gz
Qt-8454e08b44df3b5364f4c9d8c9810456902dc88b.tar.bz2
Stickman: increases the view size for making room for jumping & dying
Reviewed-by: ogoffart
Diffstat (limited to 'examples/animation/stickman')
-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 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");