Title: How to catch the model update signal in ListView
Tags: qt;qml;qtquick2
Question: Is there any way to catch the model update signal in qml.

here is my sample program. i have a rectangle on top of that there is listview.

on mouse i am updating the listmodel.

code:

```Rectangle{
        id: root
        anchors.fill: parent

        ListModel {
            id: fruitModel

            ListElement {
                name: "Apple"
                cost: 2.45
            }
            ListElement {
                name: "Orange"
                cost: 3.25
            }
            ListElement {
                name: "Banana"
                cost: 1.95
            }
        }

        Component {
            id: fruitDelegate
            Row {
                spacing: 10
                Text { text: name }
                Text { text: '$' + cost }
            }
        }

        ListView {
            id: list
            anchors.fill: parent
            model: fruitModel
            delegate: fruitDelegate
            onModelChanged: {
                console.log("hi heloooo")
            }
        }

        MouseArea{
            anchors.fill: parent
            onClicked: {
                fruitModel.append({"cost": 5.95, "name":"Pizza"})//added new 
                fruitModel.remove(1) // deleted old. so count still same
            }
        }
    }
```

On mouse click i am updating the model, i just want catch when ever there is a change in model.

Comment: @skypjack Thanks for replay. i got it.


Here is another answer: What does it mean that you change the model?   If you are interested in items added or removed, you can bind a listener to the ```onCountChanged``` signal of the ```ListView```.

Comment for this answer: Please have a look into updated code. i am updating the list but count will same. in that case onCountChanged is not getting called

{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 1, 'CommentCount': 1, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2016:00:02/08/16', 'FavoriteCount': 1.0, 'PostTypeId': 1, 'Tags': '<qt><qml><qtquick2>', 'Title': 'How to catch the model update signal in ListView', 'ViewCount': 1965, 'id': 35263913, 'user_AboutMe': '', 'user_AccountId': 2101432.0, 'user_DisplayName': 'Jeggu', 'user_Reputation': 569.0, 'user_Views': 97.0, 'user_id': 1868951.0}}