You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
880 B
39 lines
880 B
import QtQuick 2.15
|
|
import QtQuick.Window 2.15
|
|
import stackoverflow.qml 1.0
|
|
|
|
Window {
|
|
width: 640
|
|
height: 480
|
|
visible: true
|
|
title: qsTr("Hello World")
|
|
|
|
Rectangle {
|
|
width: 200
|
|
height: 200
|
|
anchors.centerIn: parent
|
|
color: "lightgrey"
|
|
|
|
Triangle {
|
|
id: rect
|
|
width: 200
|
|
height: 202
|
|
// transformOrigin: Item.Top
|
|
color: "green"
|
|
onColorChanged: console.log("color was changed");
|
|
// PropertyAnimation on rotation {
|
|
// from: 0
|
|
// to: 360
|
|
// duration: 5000
|
|
// loops: Animation.Infinite
|
|
// }
|
|
}
|
|
}
|
|
Timer {
|
|
interval: 1000
|
|
repeat: true
|
|
running: true
|
|
onTriggered: rect.color = Qt.rgba(Math.random(),Math.random(),Math.random(),1);
|
|
}
|
|
}
|