diff options
author | Kim Motoyoshi Kalland <kim.kalland@nokia.com> | 2010-10-27 13:00:38 +0200 |
---|---|---|
committer | Kim Motoyoshi Kalland <kim.kalland@nokia.com> | 2010-10-27 13:00:38 +0200 |
commit | 5b6064e2a38f0aebdc67fcc0046280e2e5addce8 (patch) | |
tree | 7128e12d76e8ead324baf5ff2d25afb9dd19a2a9 /examples | |
parent | 742d14f9161ce9450d21f58ab6e0dcd1c97082b3 (diff) |
Fixed transformation bug on the PaintItem example.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/paintitem/main.cpp | 2 | ||||
-rw-r--r-- | examples/paintitem/myfile.qml | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/examples/paintitem/main.cpp b/examples/paintitem/main.cpp index 17ccd54..a2ef410 100644 --- a/examples/paintitem/main.cpp +++ b/examples/paintitem/main.cpp @@ -51,7 +51,7 @@ class MyPaintItem : public QxPaintItem public: virtual void paint(QPainter *p) { - QRectF rect(x(), y(), width(), height()); + QRectF rect(0, 0, width(), height()); rect.adjust(10, 10, -10, -10); p->setPen(QPen(Qt::black, 20)); p->setBrush(Qt::yellow); diff --git a/examples/paintitem/myfile.qml b/examples/paintitem/myfile.qml index bd9342c..b1b1446 100644 --- a/examples/paintitem/myfile.qml +++ b/examples/paintitem/myfile.qml @@ -11,6 +11,6 @@ Rectangle { } MyPaintItem { anchors.fill: parent - anchors.margins: 0 + anchors.margins: 10 } } |