aboutsummaryrefslogtreecommitdiffstats
path: root/examples/declarative/extending/chapter1-basics/basics.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/declarative/extending/chapter1-basics/basics.py')
-rw-r--r--examples/declarative/extending/chapter1-basics/basics.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/declarative/extending/chapter1-basics/basics.py b/examples/declarative/extending/chapter1-basics/basics.py
index 9cbead9cc..db508d297 100644
--- a/examples/declarative/extending/chapter1-basics/basics.py
+++ b/examples/declarative/extending/chapter1-basics/basics.py
@@ -50,11 +50,12 @@ from PySide6.QtGui import QGuiApplication, QPen, QPainter, QColor
from PySide6.QtQml import qmlRegisterType
from PySide6.QtQuick import QQuickPaintedItem, QQuickView
+
class PieChart (QQuickPaintedItem):
nameChanged = Signal()
- def __init__(self, parent = None):
+ def __init__(self, parent=None):
QQuickPaintedItem.__init__(self, parent)
self._name = u''
self._color = QColor()
@@ -63,7 +64,7 @@ class PieChart (QQuickPaintedItem):
pen = QPen(self.color, 2)
painter.setPen(pen)
painter.setRenderHints(QPainter.Antialiasing, True)
- painter.drawPie(self.boundingRect().adjusted(1,1,-1,-1), 90 * 16, 290 * 16)
+ painter.drawPie(self.boundingRect().adjusted(1, 1, -1, -1), 90 * 16, 290 * 16)
@Property(QColor)
def color(self):