import QtQuick import QtQuick.Controls import AppDemo ApplicationWindow { visible: true width: 1200 height: 800 title: "sonobulus" TimerComponent { id: timerComponent } Column { anchors.centerIn: parent spacing: 20 Label { text: timerComponent.seconds + " s" font.pixelSize: 32 horizontalAlignment: Text.AlignHCenter } Button { text: "Reset" onClicked: timerComponent.reset() } } Item { anchors.fill: parent focus: true Keys.onPressed: (event) => { if(!event.isAutoRepeat) { keyboardController.keyDownEvent(event.key, event.modifiers, event.text) event.accepted = true } } Keys.onReleased: (event) => { if(!event.isAutoRepeat) { keyboardController.keyUpEvent(event.key, event.modifiers, event.text) event.accepted = true } } } Scope { id: scope width: 600 height: 300 // this timer triggers a constant update on the scope's canvas, calls its draw() each time Timer { id: updateTimer interval: 16 // ~60 fps running: true repeat: true onTriggered: scope.update() } } }