import QtQuick 2.1 import QtQuick.Window 2.1 import QtQml.Models 2.1 Item { id: root width: 1280 height: 100 function update() { for (var i = 0; i < 20; i++) { var obj = Qt.createQmlObject('import QtQuick 2.1; Rectangle { height: 80; width: 136; color: Qt.rgba(' + (i/20) + ',0,.3,1); border.width: 2; border.color: "black" }', objmodel) } } Component.onCompleted: update(); ObjectModel { id: objmodel } ListView { id: sourceContainer model: objmodel spacing: 4 anchors.fill: parent orientation: ListView.Horizontal } }