CheckBoxStyle
ImportStatement: import QtQuick.Controls.Styles1.2
Since: Qt 5.1
Properties
background :Component
control :CheckBox
indicator :Component
label :Component
spacing :int
DetailedDescription
Example:
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
}
}
}
}
PropertyDocumentation
background :Component
方框和文本下面的背景。
control :CheckBox
关联的CheckBox
indicator :Component
方框的按钮样式。方框可能被改成其他形状,但我们习惯性叫方框。
label :Component
文档的样式
spacing :int
文档和方框之间的标签