aboutsummaryrefslogtreecommitdiffstats
path: root/examples/qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/qml')
-rw-r--r--examples/qml/tutorials/extending-qml/chapter1-basics/basics.py2
-rw-r--r--examples/qml/tutorials/extending-qml/chapter2-methods/methods.py2
-rw-r--r--examples/qml/tutorials/extending-qml/chapter3-bindings/bindings.py2
-rw-r--r--examples/qml/tutorials/extending-qml/chapter4-customPropertyTypes/customPropertyTypes.py2
-rw-r--r--examples/qml/tutorials/extending-qml/chapter5-listproperties/listproperties.py2
-rw-r--r--examples/qml/usingmodel/usingmodel.py4
6 files changed, 7 insertions, 7 deletions
diff --git a/examples/qml/tutorials/extending-qml/chapter1-basics/basics.py b/examples/qml/tutorials/extending-qml/chapter1-basics/basics.py
index d9b974b53..322bef954 100644
--- a/examples/qml/tutorials/extending-qml/chapter1-basics/basics.py
+++ b/examples/qml/tutorials/extending-qml/chapter1-basics/basics.py
@@ -56,7 +56,7 @@ if __name__ == '__main__':
app = QGuiApplication(sys.argv)
view = QQuickView()
- view.setResizeMode(QQuickView.SizeRootObjectToView)
+ view.setResizeMode(QQuickView.ResizeMode.SizeRootObjectToView)
qml_file = os.fspath(Path(__file__).resolve().parent / 'app.qml')
view.setSource(QUrl.fromLocalFile(qml_file))
if view.status() == QQuickView.Status.Error:
diff --git a/examples/qml/tutorials/extending-qml/chapter2-methods/methods.py b/examples/qml/tutorials/extending-qml/chapter2-methods/methods.py
index 48ea30de3..238225fd3 100644
--- a/examples/qml/tutorials/extending-qml/chapter2-methods/methods.py
+++ b/examples/qml/tutorials/extending-qml/chapter2-methods/methods.py
@@ -63,7 +63,7 @@ if __name__ == '__main__':
app = QGuiApplication(sys.argv)
view = QQuickView()
- view.setResizeMode(QQuickView.SizeRootObjectToView)
+ view.setResizeMode(QQuickView.ResizeMode.SizeRootObjectToView)
qml_file = os.fspath(Path(__file__).resolve().parent / 'app.qml')
view.setSource(QUrl.fromLocalFile(qml_file))
if view.status() == QQuickView.Status.Error:
diff --git a/examples/qml/tutorials/extending-qml/chapter3-bindings/bindings.py b/examples/qml/tutorials/extending-qml/chapter3-bindings/bindings.py
index 082de19cc..ed332cba7 100644
--- a/examples/qml/tutorials/extending-qml/chapter3-bindings/bindings.py
+++ b/examples/qml/tutorials/extending-qml/chapter3-bindings/bindings.py
@@ -67,7 +67,7 @@ if __name__ == '__main__':
app = QGuiApplication(sys.argv)
view = QQuickView()
- view.setResizeMode(QQuickView.SizeRootObjectToView)
+ view.setResizeMode(QQuickView.ResizeMode.SizeRootObjectToView)
qml_file = os.fspath(Path(__file__).resolve().parent / 'app.qml')
view.setSource(QUrl.fromLocalFile(qml_file))
if view.status() == QQuickView.Status.Error:
diff --git a/examples/qml/tutorials/extending-qml/chapter4-customPropertyTypes/customPropertyTypes.py b/examples/qml/tutorials/extending-qml/chapter4-customPropertyTypes/customPropertyTypes.py
index 3530ed12e..bf24ec3c3 100644
--- a/examples/qml/tutorials/extending-qml/chapter4-customPropertyTypes/customPropertyTypes.py
+++ b/examples/qml/tutorials/extending-qml/chapter4-customPropertyTypes/customPropertyTypes.py
@@ -71,7 +71,7 @@ if __name__ == '__main__':
app = QGuiApplication(sys.argv)
view = QQuickView()
- view.setResizeMode(QQuickView.SizeRootObjectToView)
+ view.setResizeMode(QQuickView.ResizeMode.SizeRootObjectToView)
qml_file = os.fspath(Path(__file__).resolve().parent / 'app.qml')
view.setSource(QUrl.fromLocalFile(qml_file))
if view.status() == QQuickView.Status.Error:
diff --git a/examples/qml/tutorials/extending-qml/chapter5-listproperties/listproperties.py b/examples/qml/tutorials/extending-qml/chapter5-listproperties/listproperties.py
index 31510fd9e..67d7482ec 100644
--- a/examples/qml/tutorials/extending-qml/chapter5-listproperties/listproperties.py
+++ b/examples/qml/tutorials/extending-qml/chapter5-listproperties/listproperties.py
@@ -85,7 +85,7 @@ if __name__ == '__main__':
app = QGuiApplication(sys.argv)
view = QQuickView()
- view.setResizeMode(QQuickView.SizeRootObjectToView)
+ view.setResizeMode(QQuickView.ResizeMode.SizeRootObjectToView)
qml_file = os.fspath(Path(__file__).resolve().parent / 'app.qml')
view.setSource(QUrl.fromLocalFile(qml_file))
if view.status() == QQuickView.Status.Error:
diff --git a/examples/qml/usingmodel/usingmodel.py b/examples/qml/usingmodel/usingmodel.py
index 80413316d..e73eafef0 100644
--- a/examples/qml/usingmodel/usingmodel.py
+++ b/examples/qml/usingmodel/usingmodel.py
@@ -46,7 +46,7 @@ class PersonModel (QAbstractListModel):
if role == Qt.ItemDataRole.DisplayRole:
return d.name
if role == Qt.ItemDataRole.DecorationRole:
- return Qt.black
+ return Qt.GlobalColor.black
if role == PersonModel.MyRole:
return d.myrole
return None
@@ -60,7 +60,7 @@ class PersonModel (QAbstractListModel):
if __name__ == '__main__':
app = QGuiApplication(sys.argv)
view = QQuickView()
- view.setResizeMode(QQuickView.SizeRootObjectToView)
+ view.setResizeMode(QQuickView.ResizeMode.SizeRootObjectToView)
qml_file = os.fspath(Path(__file__).resolve().parent / 'view.qml')
view.setSource(QUrl.fromLocalFile(qml_file))