2023-12-15 06:01:04 +00:00
|
|
|
// Copyright (C) 2023 The Qt Company Ltd.
|
2022-05-13 13:12:05 +00:00
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
2016-11-15 16:22:40 +00:00
|
|
|
|
2023-12-15 06:01:04 +00:00
|
|
|
pragma ComponentBehavior: Bound
|
|
|
|
|
2020-03-26 16:01:51 +00:00
|
|
|
import QtQuick
|
|
|
|
import QtQuick.Controls
|
2023-12-15 06:01:04 +00:00
|
|
|
import contactlist
|
2016-11-15 16:22:40 +00:00
|
|
|
|
2016-11-21 14:54:55 +00:00
|
|
|
ListView {
|
|
|
|
id: listView
|
2016-11-15 16:22:40 +00:00
|
|
|
|
2016-11-21 14:54:55 +00:00
|
|
|
signal pressAndHold(int index)
|
2016-11-15 16:22:40 +00:00
|
|
|
|
2016-11-18 13:06:19 +00:00
|
|
|
width: 320
|
|
|
|
height: 480
|
2016-11-15 16:22:40 +00:00
|
|
|
|
2016-11-21 14:54:55 +00:00
|
|
|
focus: true
|
|
|
|
boundsBehavior: Flickable.StopAtBounds
|
2016-11-15 16:22:40 +00:00
|
|
|
|
2016-11-21 14:54:55 +00:00
|
|
|
section.property: "fullName"
|
|
|
|
section.criteria: ViewSection.FirstCharacter
|
|
|
|
section.delegate: SectionDelegate {
|
|
|
|
width: listView.width
|
|
|
|
}
|
2016-11-15 16:22:40 +00:00
|
|
|
|
2016-11-21 14:54:55 +00:00
|
|
|
delegate: ContactDelegate {
|
|
|
|
id: delegate
|
|
|
|
width: listView.width
|
2023-12-15 06:01:04 +00:00
|
|
|
|
|
|
|
required property int index
|
|
|
|
|
2019-09-05 08:33:54 +00:00
|
|
|
onPressAndHold: listView.pressAndHold(index)
|
2016-11-15 16:22:40 +00:00
|
|
|
}
|
|
|
|
|
2016-11-21 14:54:55 +00:00
|
|
|
model: ContactModel {
|
|
|
|
id: contactModel
|
2016-11-15 16:22:40 +00:00
|
|
|
}
|
2016-11-21 14:54:55 +00:00
|
|
|
|
|
|
|
ScrollBar.vertical: ScrollBar { }
|
2016-11-15 16:22:40 +00:00
|
|
|
}
|