File: ExampleButton.qml

package info (click to toggle)
qt6-quick3d 6.10.2-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 143,588 kB
  • sloc: cpp: 395,989; ansic: 41,469; xml: 288; sh: 242; makefile: 32
file content (20 lines) | stat: -rw-r--r-- 448 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Copyright (C) 2024 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause

import QtQuick
import QtQuick3D


Model {
    property bool on: false
    required property real rotationSpeed

    scale: Qt.vector3d(0.15, 0.1, 0.1)
    z: on ? -3 : 0
    source: "#Cube"
    materials: PrincipledMaterial {
        baseColor: "#111133"
    }
    Behavior on z { NumberAnimation {duration: 300} }
    pickable: true
}