title: grabToImage save the delagate pathview qml
body: <p>Hello my question is the following I am trying to iterate over the pathview delegate but I am getting an error that it does not find the image I want to save after saving the path.
  I have already worked with grabToImage to save canvas, graphics and a couple of other things but nothing with pathview delegates.</p>
  <p>And everything I find about grabToImage has nothing to do to find the solution to this particular problem.</p>
  <p>If you can guide me or help me I would appreciate it in advance</p>
  <pre><code>import QtQuick 2.15
  import QtQuick.Controls 2.12
  import QtQuick.Window 2.2
  import Qt.labs.platform 1.1
  
  Window {
      width: 600
      height: 600
      
      visible: true
      
      ListModel {      
          id: modelcon
          ListElement { img: &quot;test.jpg&quot; }
          ListElement { img: &quot;test.jpg&quot; }
          ListElement { img: &quot;test.jpg&quot; }
          ListElement { img: &quot;test.jpg&quot; }
          ListElement { img: &quot;test.jpg&quot; }
          ListElement { img: &quot;test.jpg&quot; }
          ListElement { img: &quot;test.jpg&quot; }
      }
      
      PathView {
          id: imgView
          
          clip: true
          focus: true
          interactive: true
          pathItemCount: 3
          
          model: modelcon
          
          preferredHighlightEnd: 0.5
          preferredHighlightBegin: 0.5
          
          anchors.fill: parent
          
          function nextItem() {
              imgView.incrementCurrentIndex();
          }
          
          function preItem() {
              imgView.decrementCurrentIndex();
          }
          
          function toItem(index) {
              if (index &lt;= imgView.itemCount &amp;&amp; imgView.currentIndex !== index) {
                  imgView.currentIndex = index;
              }
          }
          
          delegate: Image {
              x: (parent.width - width)/ 2
              y: (parent.height - height)/ 2
              z: PathView.iconOrder
              
              width: parent.width* 0.9
              height: parent.width * 0.4
              
              property bool rounded: true
              property bool adapt: true
              
              clip: true
              
              source: img
              
              scale: PathView.iconScale
              opacity: PathView.iconOpacity
          }
  
          path: Path {
              startX: 0
              startY: imgView.height * 0.5
              
              PathAttribute { name: &quot;iconScale&quot;; value: 0.2 }
              PathAttribute { name: &quot;iconOpacity&quot;; value: 10.2 }
              PathAttribute { name: &quot;iconOrder&quot;; value: 0 }
              PathLine {x: imgView.width / 2; y: imgView.height/2 }
              PathAttribute { name: &quot;iconScale&quot;; value: 1 }
              PathAttribute { name: &quot;iconOpacity&quot;; value: 1 }
              PathAttribute { name: &quot;iconOrder&quot;; value: 8 }
              PathLine {x: imgView.width; y: imgView.height/2 }
          }
          Button {
              id: btnOpen
              
              visible :true
              
              width: 80
              height: 80
              
              text: &quot;Save&quot;
              
              anchors.verticalCenterOffset: 0
              
              background: Rectangle {
                  color: &quot;#00000000&quot;
              }
              onClicked:{
                  filedialogSave.open()
              }
          }
      }
      
      FileDialog {
          id: filedialogSave;
          
          title: &quot;Save image&quot;;
          
          nameFilters: [&quot;Image Files (*.png)&quot;, &quot;Image Files(*.jpg)&quot;];
          
          visible: false
          fileMode: FileDialog.SaveFile
          
          onAccepted: {
              let ruta = currentFile.toString().replace('file: ///', '')
              
              imgView.grabToImage(function(result) {
                  result.saveToFile(ruta)
              });
              
              filedialogSave.close()
          }
      }
  }
  </code></pre>