aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmllistmodel/data/objectOwnership.qml
blob: 0ebb29d75b8606569d5e6ec121576d34cad6b524 (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
import QtQuick

ListView {
    id: root
    width: 100
    height: 100

    delegate: Component {
        Item {
            property Item myItem: refItem
        }
    }

    model: ListModel {
        id: listModel
        objectName: "listModel"

        function addItem() {
            append({"refItem": cppOwnedItem});
        }
    }

    function checkItem() {
        root.currentIndex = 0;
        currentItem.myItem.dummy();
    }
}