From 84d46b89590c7e313aa4ab3edd9f8b0a4e913ae6 Mon Sep 17 00:00:00 2001 From: Venugopal Shivashankar Date: Thu, 11 Jan 2018 13:45:20 +0100 Subject: Example: Adjust the boundingRect for the PieChart MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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ƶ --- examples/declarative/extending/chapter1-basics/basics.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/declarative/extending/chapter1-basics/basics.py') 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 -- cgit v1.2.3