Button 是有默认宽高的。
Button {
autoRepeat: true
onClicked: console.log("132")
}
反复发射信号
每一个属性都绑定了一个信号
Button {
checkable: true
onCheckedChanged: console.log("165146")
onClicked: console.log("132")
}
按下状态变化
Button {
onDownChanged: console.log("18941")
onClicked: console.log("132")
}
Button {
icon.source: "qrc:/images/save.png"
icon.color: "red"
text: "123"
}
Button {
icon.source: "qrc:/images/save.png"
icon.color: "red"
text: "123"
display: AbstractButton.IconOnly
}
RoundButton {
anchors.centerIn: parent
radius: 3//默认值是width/2
icon.source: "qrc:/images/save.png"
icon.color: "red"
text: "123"
display: AbstractButton.IconOnly
}
ToolButton {
anchors.centerIn: parent
icon.source: "qrc:/images/save.png"
icon.color: "red"
text: "123"
display: AbstractButton.IconOnly
}