aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qmltest/listview/data/MultiDelegate2.qml
blob: e3d0fc64cb0c7eef9e10f8b171713fde4fc439d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// Copyright (C) 2018 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause

import QtQuick 2.12
import QtQml.Models 2.12
import Qt.labs.qmlmodels 1.0

ListView {
    width: 400
    height: 400
    model: 8

    delegate: DelegateChooser {
        DelegateChoice {
            index: 0
            delegate: Item {
                property string choiceType: "1"
                width: parent.width
                height: 50
            }
        }
        DelegateChoice {
            index: 1
            delegate: Item {
                property string choiceType: "2"
                width: parent.width
                height: 50
            }
        }
        DelegateChoice {
            index: 2
            delegate: Item {
                property string choiceType: "3"
                width: parent.width
                height: 50
            }
        }
        DelegateChoice {
            index: 5
            delegate: Item {
                property string choiceType: "3"
                width: parent.width
                height: 50
            }
        }
        DelegateChoice {
            delegate: Item {
                property string choiceType: "4"
                width: parent.width
                height: 50
            }
        }
    }
}