1
我在QML中拥有这段代码,但是我无法将STATIC文本添加为每列的标题。QML列中的标题
我试过在网上看,但我似乎没有找到asnwer。或者我只是不明白。
Component {
id: pedido
Item {
id: item
width: parent.width;
Row {
id: row
width: parent.width
anchors.verticalCenter: parent.verticalCenter
Column {
width: parent.width * 0.3
Text {
text: " " + codigo;
font.family: "Helvetica"
font.pointSize: 14
font.bold: true
color: item.ListView.isCurrentItem ? "white" : "black" }
Column {
width: parent.width * 0.5
Text {
text: " " + nombre;
font.family: "Helvetica"
font.pointSize: 14
font.bold: true
color: item.ListView.isCurrentItem ? "white" : "black"
}
}
Column {
width: parent.width * 0.2
Text {
text: " " + fecha;
font.family: "Helvetica"
font.pointSize: 14
font.bold: true
}
}
如果缺少{}
,请不要担心。