游戏结束时,我将显示以下弹出窗口:
Popup {
id: popup
anchors.centerIn: parent
Text{
text: "Game Over!!" + "\n\n" + "New High Score: "+ score_val
anchors.centerIn: canvas
color: "grey"
font.pixelSize: 70
font.family: gill.name
}
modal: true
focus: true
closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutsideParent
}
都很好,但是背景是白色的,而且似乎没有背景颜色属性,我该怎么办?
您必须将一项设置为background
属性:
background