From 8454e08b44df3b5364f4c9d8c9810456902dc88b Mon Sep 17 00:00:00 2001 From: Leonardo Sobral Cunha Date: Wed, 2 Sep 2009 18:34:50 +0200 Subject: Stickman: increases the view size for making room for jumping & dying Reviewed-by: ogoffart --- examples/animation/stickman/main.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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"); -- cgit v0.12