【发布时间】:2019-09-12 09:29:02
【问题描述】:
我在以对齐方式显示列表视图中的文本时遇到问题。
我的代码是
delegate: Rectangle{
width : parent.width
height: textId.implicitHeight+20
color: "white"
border.color: "#e4e4e4"
radius: 0
RowLayout{
anchors.fill: parent
anchors.margins: 20
Text{
id:textId
text : names
// wrapMode: Text.Wrap
// Layout.fillWidth: true
// width:300
}
Text{
id:textId2
text :favoriteColor
// wrapMode: Text.Wrap
//Layout.fillWidth: true
//width: parent.width
// width:300
}
Text{
id:textId1
text :age
// wrapMode: Text.Wrap
// width: parent.width
}
}
我希望文本字段(即名称、喜爱颜色和年龄)以更加一致的方式出现。在简单的单词中以简单的表格形式显示。 即所有最喜欢的颜色和年龄从整个列表中的同一点开始。
谢谢
【问题讨论】: