summaryrefslogtreecommitdiffstats
path: root/examples/applicationmanager/process-status/apps/process-status.mem-hog/main.qml
blob: 8a495da3a1eaf9cbfafad3b7ddefb37f87888517 (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
// Copyright (C) 2021 The Qt Company Ltd.
// Copyright (C) 2019 Luxoft Sweden AB
// Copyright (C) 2018 Pelagicore AG
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause

import QtQuick
import QtApplicationManager.Application

ApplicationManagerWindow {
    id: root
    color: "green"

    Text {
        anchors.fill: parent
        text: "This application consumes a lot of memory."
        font.pixelSize: 15
        color: "white"
    }

    Rectangle {
        id: rectangle
        width: Math.min(parent.width, parent.height) / 2
        height: width
        anchors.centerIn: parent
        color: "grey"
        Timer {
            interval: 10
            repeat: true
            running: true
            onTriggered: {
                rectangle.rotation += 1;
                let s = "*".repeat(100000);
                foo.push(s);
            }
            property var foo: []
        }
    }
}