Button{
style: ButtonStyle{
background: Rectangle{
radius: 4
color: control.pressed ? “#2a5566” : “#1a353e”
border.color: control.activeFocus ? “red” : “transparent”
}
label: Text{
text: control.text
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
font.family: “Microsoft YaHei UI Light”
font.pixelSize: 28
font.letterSpacing: 0
font.wordSpacing: 0
}
}
}
QML元素使用范例-自定义按钮外观
猜你喜欢
转载自blog.csdn.net/qq_43248127/article/details/91976807
周排行