title: Get list of filenames in folder selected via FileDialog
body: <p>I'm trying to extract the path of all the image files in a folder that is selected with a <code>FileDialog</code> with <code>selectFolder: true</code>.
  All the examples I could find make use of a <code>FolderListModel</code> which gets the folder assigned statically.
  I tried defining a temporary <code>FolderListModel</code> inside the dialog and change its <code>folder</code> property once I have the result from the dialog:   </p>
  
  <pre><code>FileDialog {
      id: select_folder_dialog
  
      FolderListModel {
          id: mdl
          nameFilters: ["*.jpg", "*jpeg", "*.png"]
      }
  
      onAccepted: {
          visible = false
          var files = []
          console.log(folder)
          mdl.folder(folder)
          text1.text = qsTr("%1 images selected.".arg(mdl.count))
      }
      title: "Select a folder containing image file(s) to classify"
      selectFolder: true
  }
  </code></pre>
  
  <p>This however gets me the error:</p>
  
  <blockquote>
    <p>Cannot assign object to property</p>
  </blockquote>
  
  <p>I'm very confused. This seems to me a rather standard use-case (e.g. displaying in a list all the files in a user-defined folder), but I can't find any example.</p>
  
  <p>What is the correct way to do this?</p>