aboutsummaryrefslogtreecommitdiffstats
path: root/examples/declarative/extending/chapter1-basics/basics.py
diff options
context:
space:
mode:
authorVenugopal Shivashankar <Venugopal.Shivashankar@qt.io>2018-01-11 13:45:20 +0100
committerVenugopal Shivashankar <Venugopal.Shivashankar@qt.io>2018-01-17 14:48:44 +0000
commit84d46b89590c7e313aa4ab3edd9f8b0a4e913ae6 (patch)
treec702212d5549f6cca595e42e7254df21dc271694 /examples/declarative/extending/chapter1-basics/basics.py
parent108a64dd89132c10cb1fd06b6ac43677f5528783 (diff)
Example: Adjust the boundingRect for the PieChart
The extending QML tutorial examples draw PieChart that looks clipped, unless the boundingRect is adjusted. Task-number: PYSIDE-363 Change-Id: Ice4715f94ebae472d22596232ad1f22df59cea0f Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
Diffstat (limited to 'examples/declarative/extending/chapter1-basics/basics.py')
-rw-r--r--examples/declarative/extending/chapter1-basics/basics.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/declarative/extending/chapter1-basics/basics.py b/examples/declarative/extending/chapter1-basics/basics.py
index fb943bdb3..f965cade9 100644
--- a/examples/declarative/extending/chapter1-basics/basics.py
+++ b/examples/declarative/extending/chapter1-basics/basics.py
@@ -62,7 +62,7 @@ class PieChart (QQuickPaintedItem):
pen = QPen(self.color, 2)
painter.setPen(pen);
painter.setRenderHints(QPainter.Antialiasing, True);
- painter.drawPie(self.boundingRect(), 90 * 16, 290 * 16);
+ painter.drawPie(self.boundingRect().adjusted(1,1,-1,-1), 90 * 16, 290 * 16);
def getColor(self):
return self._color