Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'examples/qml/usingmodel')
-rw-r--r--examples/qml/usingmodel/usingmodel.py4
1 files changed, 2 insertions, 2 deletions
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))