summaryrefslogtreecommitdiff
path: root/tests/manual/qml/testfiles_quick2/subcomponent.qml
blob: df73a23f3093885fe0301d471de4e84271810aad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0

import QtQuick 2.0

Rectangle {
    width: 640
    height: 480
    Component {
        id: redSquare
        Rectangle {
            color: "red"
            width: 100
            height: 100
        }
    }

    Loader { sourceComponent: redSquare;}
    Loader { sourceComponent: redSquare; x: 20 }
}