我是 QML 的新手,我想个性化我的按钮。我成功改变了背景颜色和边框颜色。但我根本没有成功改变按钮文本的颜色。我看到我们不再使用“样式”来更改样式,而是使用“背景”,我不了解它的所有内容。
谢谢你的帮助。
Button {
id: buttonAC
text: qsTr("AC")
Layout.fillHeight: true
Layout.fillWidth: true
background: Rectangle {
border.color: "#14191D"
color: "#24292f"
// I want to change text color next
}
/*Text {
text: qsTr("AC")
color: "#F54035"
}*/
}