aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qmldom/domdata/reformatter/file2Reformatted.qml
blob: 3ed3aa208c1995a056b2633c041cf4b0507ecbd4 (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
55
56
57
58
59
60
61
62
63
64
65
66
67
import QtQuick 2.15
import QtQuick.Window 2.15

Window {
    height: 480
    title: qsTr("Scroll")
    visible: true
    width: 640

    Component.onCompleted: {
        console.log("loaded");
    }
    onSend: {
        console.log("send signal emitted with notice: " + notice);
    }
    onTrigger: console.log("trigger signal emitted")

    Rectangle {
        anchors.fill: parent

        ListView {
            model: {
                MySingleton.mySignal();
                20;
            }
            width: parent.width

            delegate: ItemDelegate {
                id: root

                text: "Item " + (index + 1)
                width: parent.width

                Rectangle {
                    text: "bla"
                }
                MyComponent {
                    property int a: {
                        let x = isNaN;
                        (45);
                        x ? 5 + 1 : 8;
                    }
                    property list<Item> b: [
                        Item {
                            width: 5
                        },
                        Item {
                            width: 6
                        }
                    ]

                    function f(v) {
                        let c = 0;
                        return {
                            a: function () {
                                if (b == 0)
                                    c += 78 * 5 * v;
                            }()
                        };
                    }

                    text: root.text
                }
            }
        }
    }
}