summaryrefslogtreecommitdiffstats
path: root/tests/manual/scene3d-loader/main.qml
blob: be0c00dde39d4a63bdeb58e8480d1d84557b84a0 (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
// Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB).
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only

import QtQuick 2.0
import QtQuick.Scene3D 2.0
import QtQuick.Controls 2.0

Item {

    Loader {
        id: loader
        anchors.fill: parent
        focus: true
        source: "Scene.qml"
    }

    Row {
        id: buttonRow
        anchors {
            horizontalCenter: parent.horizontalCenter
            bottom: parent.bottom
            bottomMargin: parent.height * 0.1
        }
        spacing: 10
        Button {
            text: "Scene 1";
            highlighted: loader.source === "Scene.qml"
            onClicked: loader.source = "Scene.qml"
        }
        Button {
            text: "Scene 2";
            highlighted: loader.source === "Scene2.qml"
            onClicked: loader.source = "Scene2.qml"
        }
    }
}