Warning, /frameworks/qqc2-desktop-style/tests/CheckBox.qml is written in an unsupported language. File is not indexed.

0001 /*
0002     SPDX-FileCopyrightText: 2020 David Redondo <kde@david-redondo.de>
0003     SPDX-FileCopyrightText: 2021 Nate Graham <nate@kde.org>
0004     SPDX-FileCopyrightText: 2021 Aleix Pol <aleixpol@kde.org>
0005 
0006     SPDX-License-Identifier: LGPL-3.0-only OR GPL-2.0-or-later
0007 */
0008 
0009 import QtQuick
0010 import QtQuick.Layouts
0011 import QtQuick.Controls
0012 
0013 ApplicationWindow {
0014     width: 300
0015     height: layout.implicitHeight
0016 
0017     ColumnLayout {
0018         id: layout
0019 
0020         width: parent.width
0021 
0022         CheckBox {
0023         }
0024 
0025         CheckBox {
0026             checked: true
0027             enabled: false
0028         }
0029 
0030         CheckBox {
0031             text: "text"
0032         }
0033 
0034         CheckBox {
0035             icon.name: "checkmark"
0036         }
0037 
0038         CheckBox {
0039             text: "text plus icon"
0040             icon.name: "checkmark"
0041         }
0042 
0043         CheckBox {
0044             text: "focused"
0045             focus: true
0046         }
0047 
0048         CheckBox {
0049             text: "checked"
0050             checkState: Qt.Checked
0051         }
0052 
0053         CheckBox {
0054             text: "partially checked"
0055             checkState: Qt.PartiallyChecked
0056             tristate: true
0057         }
0058 
0059         CheckBox {
0060             text: "disabled"
0061             enabled: false
0062         }
0063 
0064         CheckBox {
0065             text: "disabled and checked"
0066             enabled: false
0067             checkState: Qt.Checked
0068         }
0069 
0070         CheckBox {
0071             text: "disabled and icon"
0072             enabled: false
0073             icon.name: "checkmark"
0074         }
0075 
0076         CheckBox {
0077             Layout.fillWidth: true
0078             text: "This is a very long piece of text that really should be rewritten to be shorter, but sometimes life just isn't that simple."
0079         }
0080     }
0081 }
0082