title: Change QML Listview delegate from C++
body: <p>I am trying to change the delegate of qml listview from C++ but currently I stuck at how to change the alias which represents the delegate property.</p>
  
  <p><strong>Update on details:</strong>
  <em>I have multiple delegates in separated qml files, in my application there are many screens, each screen will have different UI of listview, what I want is something like:</em></p>
  
  <p><em>Pass delegate file name to C++ function >>> C++ function set delegate property of listView (or thing like that) >>> listview loads corresponding delegate.</em></p>
  
  <p>My qml file looks like:</p>
  
  <pre><code>Item {
      id: root
      property alias listViewDelegate: listView.delegate
  
      ListView{
          id: listView
          delegate: MyDelegate{} // I have MyDelegate.qml file, it's working well
          model: listModel
      }
  
      // List model
      MyListModel {
          id: listModel
      }
  }
  </code></pre>
  
  <p>I tried to change listViewDelegate alias from C++ using setProperty() method but got no luck (error in fact).</p>
  
  <pre><code>qmlObj-&gt;setProperty("listViewDelegate", componentDelegate);
  </code></pre>
  
  <p>How to achieve this? Or anyone can suggest me the better method to achieve it? Thanks!</p>