aboutsummaryrefslogtreecommitdiffstats
path: root/examples/qml/tutorials/extending-qml/chapter6-plugins
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2023-05-02 16:56:50 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2023-05-03 14:42:15 +0200
commit2388ac63d3784e59b416f993e123241cfb7f2ffa (patch)
treeef367674f06055ed1c63261a119ecc246f9c7fd7 /examples/qml/tutorials/extending-qml/chapter6-plugins
parent42be729770eeb5d40802cfc697bddd744ba2623f (diff)
QML reference examples: Add notify signals and final attribute to properties
Task-number: PYSIDE-2206 Task-number: QTBUG-111033 Pick-to: 6.5 Change-Id: I0541a3bbb4e5696962802da7f91ab79682700124 Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'examples/qml/tutorials/extending-qml/chapter6-plugins')
-rw-r--r--examples/qml/tutorials/extending-qml/chapter6-plugins/Charts/piechart.py2
-rw-r--r--examples/qml/tutorials/extending-qml/chapter6-plugins/Charts/pieslice.py6
2 files changed, 4 insertions, 4 deletions
diff --git a/examples/qml/tutorials/extending-qml/chapter6-plugins/Charts/piechart.py b/examples/qml/tutorials/extending-qml/chapter6-plugins/Charts/piechart.py
index b721a7130..6a7e80ccb 100644
--- a/examples/qml/tutorials/extending-qml/chapter6-plugins/Charts/piechart.py
+++ b/examples/qml/tutorials/extending-qml/chapter6-plugins/Charts/piechart.py
@@ -19,7 +19,7 @@ class PieChart(QQuickItem):
self._slices = []
self._name = ''
- @Property(str)
+ @Property(str, final=True)
def name(self):
return self._name
diff --git a/examples/qml/tutorials/extending-qml/chapter6-plugins/Charts/pieslice.py b/examples/qml/tutorials/extending-qml/chapter6-plugins/Charts/pieslice.py
index 7945eff12..67242a967 100644
--- a/examples/qml/tutorials/extending-qml/chapter6-plugins/Charts/pieslice.py
+++ b/examples/qml/tutorials/extending-qml/chapter6-plugins/Charts/pieslice.py
@@ -20,7 +20,7 @@ class PieSlice(QQuickPaintedItem):
self._from_angle = 0
self._angle_span = 0
- @Property(QColor)
+ @Property(QColor, final=True)
def color(self):
return self._color
@@ -28,7 +28,7 @@ class PieSlice(QQuickPaintedItem):
def color(self, color):
self._color = QColor(color)
- @Property(int)
+ @Property(int, final=True)
def fromAngle(self):
return self._from_angle
@@ -36,7 +36,7 @@ class PieSlice(QQuickPaintedItem):
def fromAngle(self, fromAngle):
self._from_angle = fromAngle
- @Property(int)
+ @Property(int, final=True)
def angleSpan(self):
return self._angle_span