import QtQuick 2.12 import QtQuick.Controls 2.12 import "../" Item { id: root function updateListOfMessages(listOfMesseges) { id_model.clear() for (var i = 0; i < listOfMesseges.length; i++) { id_model.append({ "info": listOfMesseges[i] }) } } ListModel { id: id_model } ListView { anchors.fill: parent model: id_model spacing: 5 clip: true delegate: C_TableDelegate { userData: info width: root.width indexOfDelegate: index } } }