aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/models
diff options
context:
space:
mode:
Diffstat (limited to 'examples/quick/models')
-rw-r--r--examples/quick/models/objectlistmodel/objectlistmodel.py2
-rw-r--r--examples/quick/models/stringlistmodel/stringlistmodel.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/examples/quick/models/objectlistmodel/objectlistmodel.py b/examples/quick/models/objectlistmodel/objectlistmodel.py
index 0843ae480..41110c1af 100644
--- a/examples/quick/models/objectlistmodel/objectlistmodel.py
+++ b/examples/quick/models/objectlistmodel/objectlistmodel.py
@@ -9,6 +9,7 @@ from PySide6.QtQuick import QQuickView
# This example illustrates exposing a list of QObjects as a model in QML
+
class DataObject(QObject):
nameChanged = Signal()
@@ -35,7 +36,6 @@ class DataObject(QObject):
self._color = color
colorChanged.emit()
-
name = Property(str, name, setName, notify=nameChanged)
color = Property(str, color, setColor, notify=colorChanged)
diff --git a/examples/quick/models/stringlistmodel/stringlistmodel.py b/examples/quick/models/stringlistmodel/stringlistmodel.py
index a7a1807bb..3982b1ffc 100644
--- a/examples/quick/models/stringlistmodel/stringlistmodel.py
+++ b/examples/quick/models/stringlistmodel/stringlistmodel.py
@@ -15,7 +15,7 @@ if __name__ == '__main__':
dataList = ["Item 1", "Item 2", "Item 3", "Item 4"]
view = QQuickView()
- view.setInitialProperties({"model": dataList })
+ view.setInitialProperties({"model": dataList})
qml_file = Path(__file__).parent / "view.qml"
view.setSource(QUrl.fromLocalFile(qml_file))