import QtQuick import QtQuick.Controls import QtQuick.Layouts GridLayout { columns: 2 ListModel { id: lm ListElement { name: "first" } ListElement { name: "second" } ListElement { name: "third" } ListElement { name: "fourth" } ListElement { name: "fifth" } ListElement { name: "sixth" } ListElement { name: "seventh" } } Label { Layout.fillWidth: true text: "ItemDelegate" } Label { Layout.fillWidth: true text: "SwipeDelegate" } ListView { id: lvItem implicitHeight: 500 implicitWidth: 200 Layout.fillWidth: true Layout.fillHeight: true model: lm highlight: Rectangle { color: "red" } delegate: ItemDelegate { width: lvItem.width text: name onClicked: lvItem.currentIndex = index } } ListView { id: lvSwipe implicitHeight: 500 implicitWidth: 200 Layout.fillWidth: true Layout.fillHeight: true model: lm highlight: Rectangle { color: "red" } delegate: SwipeDelegate { width: lvSwipe.width text: name onClicked: lvSwipe.currentIndex = index } } }