contentItem:Rectangle 的功能是:重定义dialog窗口,这样就会去掉默认的OK、Reset、NO按钮
Dialog {
id:promptDlg
visible: false
title: ""
width: 400
height: 60
contentItem:Rectangle {
color: "lightskyblue"
width: parent.width
height: parent.height
Text{
id:pDlgText
color: red
width: parent.width
height: parent.height
padding: 10
lineHeight: 1
verticalAlignment: Text.AlignVCenter
text: "提示信息"
fontSizeMode: Text.Fit
font.pixelSize: 13
anchors.centerIn: parent
wrapMode:Text.WrapAnywhere;
}
}
}
秋风写于淄博,业务联系与技术交流:Q375172665