aboutsummaryrefslogtreecommitdiffstats
path: root/tests/manual/pointer/content/CheckBox.qml
blob: fd8933796390e3ad35dbb79e45ddcd42caf05df4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Copyright (C) 2018 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0

import QtQuick 2.12

Row {
    id: root
    property bool checked : false
    property string label : "CheckBox"
    Rectangle {
        width: 10; height: 10
        color: root.checked ? "#202020" : "transparent"
        border.color: "black"
        TapHandler {
            onTapped: root.checked = !root.checked
        }
    }
    Text { text: root.label }
}