aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/models/objectlistmodel/view.qml
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2025-09-11 15:34:08 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2025-09-15 16:34:11 +0200
commit0ad827ba2f02b0b47466a81d352194c685cb02bb (patch)
tree5f294383ee5f8c8c223c64105091dfdea0b7683f /examples/quick/models/objectlistmodel/view.qml
parente2c54140d7777515aa181cbd4b71e4aa1bf7c91d (diff)
Update examples (simple cases)
Task-number: PYSIDE-2206 Pick-to: 6.10 Change-Id: Ib97a137fcbe9c1fca839743f4a8d41599794ad04 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'examples/quick/models/objectlistmodel/view.qml')
-rw-r--r--examples/quick/models/objectlistmodel/view.qml16
1 files changed, 11 insertions, 5 deletions
diff --git a/examples/quick/models/objectlistmodel/view.qml b/examples/quick/models/objectlistmodel/view.qml
index b7cf68a9b..3cb072dd3 100644
--- a/examples/quick/models/objectlistmodel/view.qml
+++ b/examples/quick/models/objectlistmodel/view.qml
@@ -2,14 +2,20 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import QtQuick
+import QtQuick.Controls
ListView {
- width: 100; height: 100
+ id: listview
+ width: 200; height: 320
+ required model
+ ScrollBar.vertical: ScrollBar { }
delegate: Rectangle {
- color: model.modelData.color
- height: 25
- width: 100
- Text { text: model.modelData.name }
+ width: listview.width; height: 25
+
+ required color
+ required property string name
+
+ Text { text: parent.name }
}
}