title: how to add PathLine to ShapePath with a Repeater?
body: <p><strong>UPDATE 1</strong> - i can get it to work using Javascript - but that seems to be a little bit unoptimized (from 2-3% to 30% load with qmlscene.exe when activated) - complete recreation when the model changes (its not ever growing), is that the only way or is there a more &quot;declarative&quot; style available?</p>
  <p>How can i add a PathLine to a ShapePath based on a Model?</p>
  <ul>
  <li>i know how to use a Repeater from outside of Items but not how to implode them inside of Items</li>
  <li>do i need some sort of Repeater-Delegate on pathElements?</li>
  <li>and i don't want to use the LineSeries component</li>
  </ul>
  <p><a href="https://i.stack.imgur.com/0ZvOk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0ZvOk.png" alt="enter image description here" /></a></p>
  <pre><code>import QtQuick.Shapes 1.15
  import QtQuick 2.15
  
  Shape {
      ListModel {
          id: myPositions
          ListElement { x: 0; y:38 }
          ListElement { x: 10; y: 28 }
          ListElement { x: 20; y: 30 }
          ListElement { x: 30; y: 14 }
      }
  
      ShapePath {
          strokeColor: &quot;black&quot;
          strokeWidth: 1
          fillColor: &quot;transparent&quot;
  
          startX: 0
          startY: 0
  
          PathLine { x: 0; y: 38 }
          PathLine { x: 10; y: 28 }
          PathLine { x: 20; y: 30 }
          PathLine { x: 30; y: 14 }
  
  //        Repeater {
  //            model: myPositions
  //            PathLine { x: model.x; y: model.y }
  //        }
      }
  }
  </code></pre>
  <p><strong>UPDATE 1</strong></p>
  <p><a href="https://i.stack.imgur.com/LfDr8.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LfDr8.gif" alt="enter image description here" /></a></p>
  <pre><code>import QtQuick.Shapes 1.15
  import QtQuick 2.15
  
  Shape {
      ListModel {
          id: myPositions
      }
  
      function getRandomInt(min, max) {
          min = Math.ceil(min);
          max = Math.floor(max);
          return Math.floor(Math.random() * (max - min + 1)) + min;
      }
  
      Timer
      {
          interval: 100
          running: true
          repeat: true
  
          property real myX: 0
  
          onTriggered: {
              myPositions.append({&quot;x&quot;:myX, &quot;y&quot;:getRandomInt(0,30)})
              myX = myX + 10
          }
      }
  
      function createPathLineElements(positionsModel, shapePath)
      {
          var pathElements = []
  
          for (var i = 0; i &lt; positionsModel.count; i++)
          {
              var pos = myPositions.get(i)
              var pathLine = Qt.createQmlObject('import QtQuick 2.15; PathLine {}',
                                                shapePath);
              pathLine.x = pos.x
              pathLine.y = pos.y
              pathElements.push(pathLine)
          }
  
          return pathElements
      }
  
      ShapePath {
          id: myPath
  
          strokeColor: &quot;black&quot;
          strokeWidth: 1
          fillColor: &quot;transparent&quot;
  
          startX: 0
          startY: 0
  
          pathElements: createPathLineElements(myPositions, myPath)
      }
  }
  </code></pre>