Files
qt-creator/tests/manual/qml/testfiles_quick2/subcomponent.qml

21 lines
448 B
QML
Raw Normal View History

// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 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 }
}