title: Use QQmlListProperty to show and modify QList in Qml
body: <p>again, well i have a question (and maybe a problem), i make a program with qt and qml in qt5 and qml with qtquick 2.0, and i have a c++ model qlist, and i need modify the list in runtime,  i use q QQmlListProperty and show the items in qml, but they are not hide and show in the moment when i add or remove my code is next:</p>
  
  <pre><code>class ConceptsList: public QObject{ 
  
   Q_OBJECT
   Q_PROPERTY(QQmlListProperty&lt;Concept&gt; concepts READ concepts NOTIFY conceptsChanged) 
   Q_CLASSINFO("DefaultProperty", "concepts")
  
   public:
    ConceptsList(QObject *parent=0);
  
    QQmlListProperty&lt;Concept&gt; concepts();
    Q_INVOKABLE static void append_concept(QQmlListProperty&lt;Concept&gt; *list, Concept *cpt);
  
    Q_INVOKABLE void removeConcept(int index);
    Q_INVOKABLE void addConcept(QString m_id,QString description, QString quantity, QString price, QString unit, QString total);
  
    Q_INVOKABLE int countConcepts();
  
    static void clearConcepts(QQmlListProperty&lt;Concept&gt; *property);
    static int conceptsSize(QQmlListProperty&lt;Concept&gt; *property);
    static Concept *conceptAt(QQmlListProperty&lt;Concept&gt; *property, int index);
  
   signals:
    void conceptsChanged();
  
   private:
    QList&lt;Concept *&gt; m_concepts;
  }
  </code></pre>
  
  <p>I use a listview and delegate and i not have problems to view, but my question is if i can use a QQmlListProperty and modify the Qlist, or i will change a form to expose qlist to qml, if it's posible how call the method from qml, or how implement in C++, i ask because exists really little number or examples with work this form.
  in qml my code is next:</p>
  
  <pre><code>    ConceptsList{
          id:cpts
          concepts:[
             Concept{
                  m_id:"7"
                  m_quantity: "3"
                  m_price: "1"
                  m_unit:"1"
                  m_description:"algo"
                  m_total:"2"
              }
          ]
      }
  
      ListView {
              id: listConceptsView
              objectName: "list"
              anchors.fill: parent
              anchors.margins: 5
              clip: true
              focus: true
              highlight: highlightBar
              highlightFollowsCurrentItem: false
  
  
              Component{
                  id: tableConceptDelegate
  
                  Item{
                      anchors.margins: 4
                      width: 515
                      height: 27
                      clip: true
  
                      Row {
                          spacing: 4
  
                          Text {
                              height: 26; width: 76
                              text: model.m_id
                              color: "black"
                              font.bold: true
                              horizontalAlignment: Text.AlignHCenter
                          }
                          ...
  
                          ...
  
                          Text {
                              height: 26; width: 120
                              text: model.m_total//amountTotal
                              color: "black"
                              font.bold: true
                              horizontalAlignment: Text.AlignHCenter
                          }
                      }
  
                      MouseArea {
                          id: mouse_area1
                          anchors.fill: parent
                          onClicked:
                          {
                              listConceptsView.currentIndex = index
                          }
                      }
                  }
  
              }
  
              delegate: tableConceptDelegate
              model:cptCpt // i define this alias how cptCpt: cpt.concepts
          }
  </code></pre>