aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick3d/particles3d/CustomCheckBox.qml
diff options
context:
space:
mode:
authorAndy Nichols <andy.nichols@qt.io>2023-06-08 16:25:47 +0200
committerAndy Nichols <nezticle@gmail.com>2023-06-12 16:05:36 +0200
commitf7cc7656e2bd01851c5fb04747b0c8439ffa9dbe (patch)
tree3999f4a6efc61e1841e21941fd6bf8a51025d121 /examples/quick3d/particles3d/CustomCheckBox.qml
parent16c734c0a26b5fed0542f3ef2fee07be74a45da8 (diff)
Fix qmllint errors in particles3d example
Pick-to: 6.6 Change-Id: I10126755f2a42fb365219f09b9c54e45ed8e4316 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
Diffstat (limited to 'examples/quick3d/particles3d/CustomCheckBox.qml')
-rw-r--r--examples/quick3d/particles3d/CustomCheckBox.qml46
1 files changed, 46 insertions, 0 deletions
diff --git a/examples/quick3d/particles3d/CustomCheckBox.qml b/examples/quick3d/particles3d/CustomCheckBox.qml
new file mode 100644
index 00000000..8e358a54
--- /dev/null
+++ b/examples/quick3d/particles3d/CustomCheckBox.qml
@@ -0,0 +1,46 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Layouts
+
+Item {
+ property alias text: propText.text
+ property alias checked: checkBox.checked
+
+ width: rowLayout.width
+ height: rowLayout.height
+
+ RowLayout {
+ id: rowLayout
+ CheckBox {
+ id: checkBox
+ indicator: Rectangle {
+ anchors.centerIn: parent
+ implicitWidth: 20
+ implicitHeight: 20
+ radius: 5
+ color: checkBox.pressed ? "#d0d0d0" : "#606060"
+ border.color: "#848895"
+ Rectangle {
+ anchors.centerIn: parent
+ implicitWidth: 12
+ implicitHeight: 12
+ radius: 4
+ color: "#ffffff"
+ border.color: "#848895"
+ visible: checkBox.checked
+ }
+ }
+ }
+ Label {
+ id: propText
+ color: "#f0f0f0"
+ font.pointSize: AppSettings.fontSizeSmall
+ Layout.minimumWidth: 150
+ Layout.maximumWidth: 150
+ opacity: checkBox.checked ? 1.0 : 0.5
+ }
+ }
+}