diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2024-12-20 08:35:46 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2025-01-06 11:52:18 +0100 |
commit | 7189a4c5ec193d30c6bd4e68701038880cbc5982 (patch) | |
tree | 87e4ec00d7e9d31e5df0c11b155e46ffd3726362 /examples/qml/usingmodel | |
parent | ab8b330123cb557f66306b237f4c3aa8c0004f39 (diff) |
Use fully qualified enumerations in more examples
Pick-to: 6.8
Task-number: PYSIDE-1735
Change-Id: Ic2c478ef363d73f65f366e21529c0429c86539aa
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'examples/qml/usingmodel')
-rw-r--r-- | examples/qml/usingmodel/usingmodel.py | 4 |
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)) |