Warning, /webapps/qmlonline/qml/examples/listmodel.qml is written in an unsupported language. File is not indexed.
0001 import QtQuick 2.12 0002 import QtQml.Models 2.12 0003 0004 Item { 0005 ListModel { 0006 id: colorModel 0007 ListElement { color: "blue"; x: 20; y: 20 } 0008 ListElement { color: "red"; x: 80; y: 30 } 0009 ListElement { color: "green"; x: 90; y: 70 } 0010 } 0011 0012 Repeater { 0013 model: colorModel 0014 Rectangle { 0015 width: 30 0016 height: 30 0017 color: model.color 0018 x: model.x 0019 y: model.y 0020 } 0021 } 0022 }