summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorKim Motoyoshi Kalland <kim.kalland@nokia.com>2010-10-27 13:00:38 +0200
committerKim Motoyoshi Kalland <kim.kalland@nokia.com>2010-10-27 13:00:38 +0200
commit5b6064e2a38f0aebdc67fcc0046280e2e5addce8 (patch)
tree7128e12d76e8ead324baf5ff2d25afb9dd19a2a9 /examples
parent742d14f9161ce9450d21f58ab6e0dcd1c97082b3 (diff)
Fixed transformation bug on the PaintItem example.
Diffstat (limited to 'examples')
-rw-r--r--examples/paintitem/main.cpp2
-rw-r--r--examples/paintitem/myfile.qml2
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
}
}