Changeset View
Changeset View
Standalone View
Standalone View
tests/components/checkbox3.qml
- This file was added.
1 | import QtQuick 2.0 | ||||
---|---|---|---|---|---|
2 | | ||||
3 | import org.kde.plasma.components 3.0 as PlasmaComponents | ||||
4 | import QtQuick.Layouts 1.2 | ||||
5 | | ||||
6 | Rectangle | ||||
7 | { | ||||
8 | width: 500 | ||||
9 | height: 500 | ||||
10 | color: "white" | ||||
11 | | ||||
12 | Grid { | ||||
13 | anchors.fill: parent | ||||
14 | anchors.margins: 20 | ||||
15 | spacing: 4 | ||||
16 | columns: 2 | ||||
17 | | ||||
18 | Label { | ||||
19 | text: "text" | ||||
20 | } | ||||
21 | PlasmaComponents.CheckBox { | ||||
22 | text: "Some awesome checkbox" | ||||
23 | } | ||||
24 | | ||||
25 | Label { | ||||
26 | text: "focus" | ||||
27 | } | ||||
28 | PlasmaComponents.CheckBox { | ||||
29 | text: "Some awesome checkbox" | ||||
30 | focus: true | ||||
31 | } | ||||
32 | | ||||
33 | Label { | ||||
34 | text: "checked" | ||||
35 | } | ||||
36 | PlasmaComponents.CheckBox { | ||||
37 | text: "Some awesome checkbox" | ||||
38 | checkState: Qt.Checked | ||||
39 | } | ||||
40 | | ||||
41 | Label { | ||||
42 | text: "tri-state" | ||||
43 | } | ||||
44 | PlasmaComponents.CheckBox { | ||||
45 | text: "Some awesome checkbox" | ||||
46 | checkState: Qt.PartiallyChecked | ||||
47 | } | ||||
48 | | ||||
49 | Label { | ||||
50 | text: "disabled" | ||||
51 | } | ||||
52 | PlasmaComponents.CheckBox { | ||||
53 | text: "Some awesome checkbox" | ||||
54 | enabled: false | ||||
55 | } | ||||
56 | | ||||
57 | Label { | ||||
58 | text: "disabled and checked" | ||||
59 | } | ||||
60 | PlasmaComponents.CheckBox { | ||||
61 | text: "Some awesome checkbox" | ||||
62 | enabled: false | ||||
63 | checkState: Qt.Checked | ||||
64 | } | ||||
65 | } | ||||
66 | } | ||||
67 | |