aboutsummaryrefslogtreecommitdiffstats
path: root/examples/declarative/extending/chapter2-methods
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-11-02 10:01:09 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-11-02 09:35:19 +0000
commitaabd19b0f58816a76f24d13a318a4952d45baba4 (patch)
tree2703bc824a772230e4db40ebbc8aff1f9138b33f /examples/declarative/extending/chapter2-methods
parenta635af92eb7ee24b6f5273b4467fb2bd2a2e7684 (diff)
Examples: Remove utils.py
It is no longer required for Python3. Change-Id: I5cbdcae5273e59e494c61319fe986c4611dbab97 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'examples/declarative/extending/chapter2-methods')
-rw-r--r--examples/declarative/extending/chapter2-methods/methods.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/examples/declarative/extending/chapter2-methods/methods.py b/examples/declarative/extending/chapter2-methods/methods.py
index e2a4eb804..819d4514a 100644
--- a/examples/declarative/extending/chapter2-methods/methods.py
+++ b/examples/declarative/extending/chapter2-methods/methods.py
@@ -41,9 +41,8 @@
"""PySide2 port of the qml/tutorials/extending-qml/chapter2-methods 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, Slot, QUrl, Qt
from PySide2.QtGui import QGuiApplication, QPen, QPainter, QColor
@@ -74,7 +73,7 @@ class PieChart (QQuickPaintedItem):
self._name = value
color = Property(QColor, getColor, setColor)
- name = Property(text_type, getName, setName)
+ name = Property(str, getName, setName)
chartCleared = Signal()
@Slot() # This should be something like @Invokable