aboutsummaryrefslogtreecommitdiffstats
path: root/tests/manual/pointer/content/CheckBox.qml
blob: bd5661d76bf80913df6069208acb726259813135 (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

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 }
}