diff options
author | Nico Vertriest <nico.vertriest@qt.io> | 2018-10-04 14:27:58 +0200 |
---|---|---|
committer | Nico Vertriest <nico.vertriest@qt.io> | 2018-10-15 12:26:44 +0000 |
commit | e8422196ce16a0a9abdb2b342f9caeb8ef7a6149 (patch) | |
tree | 2f50b7328b03b31db33b6c482d469894ea47fbd4 | |
parent | cf145d63194ef8b6c44610a66daaee6a9d4b03cb (diff) |
Doc: Update source code for deleting alarmsv5.12.0-beta3
Rewrote delete statement in AlarmDelegate.qml
Change-Id: Ib112103c0666a6bce34576da5f38594ceac14788
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
-rw-r--r-- | examples/tutorials/alarms/AlarmDelegate.qml | 2 | ||||
-rw-r--r-- | examples/tutorials/alarms/main.qml | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/examples/tutorials/alarms/AlarmDelegate.qml b/examples/tutorials/alarms/AlarmDelegate.qml index 97ffc8676..f9f199ec1 100644 --- a/examples/tutorials/alarms/AlarmDelegate.qml +++ b/examples/tutorials/alarms/AlarmDelegate.qml @@ -136,7 +136,7 @@ ItemDelegate { width: 40 height: 40 visible: root.checked - onClicked: alarmModel.remove(alarmListView.currentIndex, 1) + onClicked: root.ListView.view.model.remove(root.ListView.view.currentIndex, 1) } } } diff --git a/examples/tutorials/alarms/main.qml b/examples/tutorials/alarms/main.qml index 225fd3ec1..acd541687 100644 --- a/examples/tutorials/alarms/main.qml +++ b/examples/tutorials/alarms/main.qml @@ -64,7 +64,7 @@ ApplicationWindow { ListView { id: alarmListView anchors.fill: parent - model: AlarmModel { id: alarmModel } + model: AlarmModel {} delegate: AlarmDelegate {} } |