我是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"
}*/
}
Run Code Online (Sandbox Code Playgroud)