diff options
Diffstat (limited to 'examples/declarative/extending/chapter5-listproperties/listproperties.py')
-rw-r--r-- | examples/declarative/extending/chapter5-listproperties/listproperties.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/examples/declarative/extending/chapter5-listproperties/listproperties.py b/examples/declarative/extending/chapter5-listproperties/listproperties.py index 5c3c428c2..dd3e5c65c 100644 --- a/examples/declarative/extending/chapter5-listproperties/listproperties.py +++ b/examples/declarative/extending/chapter5-listproperties/listproperties.py @@ -41,9 +41,8 @@ """PySide2 port of the qml/tutorials/extending-qml/chapter5-listproperties example from Qt v5.x""" -import sys, os -sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', '..', 'utils')) -from utils import text_type +import os +import sys from PySide2.QtCore import Property, QUrl from PySide2.QtGui import QGuiApplication, QPen, QPainter, QColor @@ -97,7 +96,7 @@ class PieChart (QQuickItem): def setName(self, value): self._name = value - name = Property(text_type, getName, setName) + name = Property(str, getName, setName) def appendSlice(self, _slice): _slice.setParentItem(self) |