mirror of https://github.com/qt/qtdoc.git
Doc: Update source code for deleting alarms
Rewrote delete statement in AlarmDelegate.qml Change-Id: Ib112103c0666a6bce34576da5f38594ceac14788 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
This commit is contained in:
parent
cf145d6319
commit
e8422196ce
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -64,7 +64,7 @@ ApplicationWindow {
|
|||
ListView {
|
||||
id: alarmListView
|
||||
anchors.fill: parent
|
||||
model: AlarmModel { id: alarmModel }
|
||||
model: AlarmModel {}
|
||||
delegate: AlarmDelegate {}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue