CheckBoxStyle QML Type

Provides custom styling for CheckBox 更多...

导入语句: import QtQuick.Controls.Styles 1.4
Since: Qt 5.1

特性

详细描述

范例:

CheckBox {
    text: "Check Box"
    style: CheckBoxStyle {
        indicator: Rectangle {
                implicitWidth: 16
                implicitHeight: 16
                radius: 3
                border.color: control.activeFocus ? "darkblue" : "gray"
                border.width: 1
                Rectangle {
                    visible: control.checked
                    color: "#555"
                    border.color: "#333"
                    radius: 1
                    anchors.margins: 4
                    anchors.fill: parent
                }
        }
    }
}
					

特性文档编制

background : 组件

The background under indicator and label.


[read-only] control : CheckBox

CheckBox this style is attached to.


indicator : 组件

This defines the indicator button.


label : 组件

This defines the text label.


spacing : int

The spacing between indicator and label.