File: qml-demo-client.qml

package info (click to toggle)
qtmir 0.8.0~git20230223.bd21224-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 4,568 kB
  • sloc: cpp: 22,847; python: 304; xml: 271; ansic: 87; makefile: 20; sh: 12
file content (35 lines) | stat: -rw-r--r-- 735 bytes parent folder | download | duplicates (4)
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
import QtQuick 2.0

Rectangle {
    onWidthChanged: print("WIDTH", width)
    onHeightChanged: print("HEIGHT", height)
    width: 600
    height: 80*6
    color: "blue"

    Column {
        anchors.fill: parent
        MovingRect {}
        MovingRect {}
        MovingRect {}
        MovingRect {}
        MovingRect {}
        MovingRect {}
    }

    Rectangle {
        id: flasher
        width: 100
        height: 100
        anchors.bottom: parent.bottom
        anchors.right: parent.right
        color: (on) ? "yellow" : "green"
        property bool on: false
        Timer {
            interval: 1000
            repeat: true
            running: true
            onTriggered: flasher.on = !flasher.on
        }
    }
}