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.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/examples/declarative/extending/chapter1-basics/basics.py b/examples/declarative/extending/chapter1-basics/basics.py
index e75e1b330..a604a05bc 100644
--- a/examples/declarative/extending/chapter1-basics/basics.py
+++ b/examples/declarative/extending/chapter1-basics/basics.py
@@ -41,9 +41,8 @@
"""PySide2 port of the qml/tutorials/extending-qml/chapter1-basics 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, Signal, QUrl
from PySide2.QtGui import QGuiApplication, QPen, QPainter, QColor
@@ -76,7 +75,7 @@ class PieChart (QQuickPaintedItem):
nameChanged = Signal()
color = Property(QColor, getColor, setColor)
- name = Property(text_type, getName, setName, notify=nameChanged)
+ name = Property(str, getName, setName, notify=nameChanged)
if __name__ == '__main__':
app = QGuiApplication(sys.argv)