The loop is imperative code, so it is not QML, but Javascript or C ++. Therefore, you can do this (for example, by embedding a call to Qt.createComponent () in a JS loop), but in QML it is better to think of declarative, which means that you do not "do" things, you define 'things:
import QtQuick 2.0 Rectangle { id: base; width: 400; height: 800; Column { spacing: 5;
Thus, it is really more powerful and much cleaner in terms of QML!
source share