diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2012-06-25 19:44:44 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-06-26 04:18:14 +0200 |
commit | 62d4840011c3b5038402a4b043a7f7f85995b8f3 (patch) | |
tree | 54b8a7e2c182a0e4651f6fcdd25e3cfd2d1cf805 /examples/graphicsview | |
parent | a1f9149ac75f08877074d4898399b46943eb9cd2 (diff) |
Replace the QGraphicsItem deprecated transforming functions
The scale(), rotate() and translate() functions are replaced with
QGraphicsItem::setTransform.
Change-Id: Icb81c71b1513c049e2fd607995ca3a868108ee30
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Andreas Aardal Hanssen <andrhans@cisco.com>
Diffstat (limited to 'examples/graphicsview')
-rw-r--r-- | examples/graphicsview/dragdroprobot/main.cpp | 2 | ||||
-rw-r--r-- | examples/graphicsview/weatheranchorlayout/main.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/examples/graphicsview/dragdroprobot/main.cpp b/examples/graphicsview/dragdroprobot/main.cpp index f12f6080c7..05d3c8f1b3 100644 --- a/examples/graphicsview/dragdroprobot/main.cpp +++ b/examples/graphicsview/dragdroprobot/main.cpp @@ -77,7 +77,7 @@ int main(int argc, char **argv) } Robot *robot = new Robot; - robot->scale(1.2, 1.2); + robot->setTransform(QTransform::fromScale(1.2, 1.2), true); robot->setPos(0, -20); scene.addItem(robot); //! [1] diff --git a/examples/graphicsview/weatheranchorlayout/main.cpp b/examples/graphicsview/weatheranchorlayout/main.cpp index fd91967cc3..64605bebc0 100644 --- a/examples/graphicsview/weatheranchorlayout/main.cpp +++ b/examples/graphicsview/weatheranchorlayout/main.cpp @@ -91,7 +91,7 @@ public: void setGeometry (const QRectF &rect) { - original->scale(rect.width() / r.width(), rect.height() / r.height()); + original->setTransform(QTransform::fromScale(rect.width() / r.width(), rect.height() / r.height()), true); original->setPos(rect.x(), rect.y()); r = rect; } |