import QtQuick 2.9
import QtQuick.Window 2.2
import QtQuick.Controls 2.4
Window {
visible: true
width: 640
height: 480
title: qsTr("Das Schmalter")
Page {
id: app
state: "off"
anchors.fill: parent
Button {
id: onOffBt
width: 400
height: width
anchors.centerIn: parent
background: Item {
id: lamp
Image {
id: lampOn
source: "on.png"
scale: 0
}
id: lampOn0
source: "on0.png"
id: lampOn1
source: "on1.png"
id: lampOn2
source: "on2.png"
id: lampOn3
source: "on3.png"
id: lampOn4
source: "on4.png"
id: lampOn5
id: lampOff
source: "off.png"
scale: 1
onClicked: {
if (app.state === "on") {
app.state = "off"
} else {
app.state = "on"
states: [
State {
name: "on"
PropertyChanges {
target: lampOn
target: lampOff
},
name: "off"
]