aboutsummaryrefslogtreecommitdiffstats
path: root/examples/qml/usingmodel/view.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/qml/usingmodel/view.qml')
-rw-r--r--examples/qml/usingmodel/view.qml21
1 files changed, 21 insertions, 0 deletions
diff --git a/examples/qml/usingmodel/view.qml b/examples/qml/usingmodel/view.qml
new file mode 100644
index 000000000..e8b1fb2fb
--- /dev/null
+++ b/examples/qml/usingmodel/view.qml
@@ -0,0 +1,21 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import PersonModel
+
+ListView {
+ width: 100
+ height: 100
+ anchors.fill: parent
+ model: PersonModel
+ delegate: Component {
+ Rectangle {
+ height: 25
+ width: 100
+ Text {
+ text: display + ": " + myrole
+ }
+ }
+ }
+}