So the subject is basicaly what I'm asking.
TableViewStyle
{
Component {
id: header
Rectangle {
anchors.topMargin: 5
height: 22
anchors.verticalCenter: parent.verticalCenter
color: "#6d6e70"
Text {
anchors.fill: parent
anchors.verticalCenter: parent.verticalCenter
horizontalAlignment: Text.Center
verticalAlignment: Text.AlignVCenter
text: styleData.value
color: "white"
renderType: Text.NativeRendering
}
Rectangle {
anchors.right: parent.right
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.bottomMargin: 1
anchors.topMargin: 1
width: 1
color: "black"
}
}
}
Component {
id: defaultRow
Rectangle {
height: 30
property color selectedColor: styleData.row % 2 ? "#fbfbfc" : "white"
color: styleData.selected ? "#999" : selectedColor
Rectangle {
width: 1
color: "black"
}
}
}
Component {
id: largeRow
Rectangle {
height: 120
property color selectedColor: styleData.row % 2 ? "#fbfbfc" : "white"
color: styleData.selected ? "#999" : selectedColor
Rectangle {
width: 1
color: "black"
}
}
}
Component {
id: imageDelegate
Image {
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
fillMode: Image.PreserveAspectFit
cache: true;
asynchronous: true;
source: styleData.value
}
}
}
For headers there is a border with width 1 and black color, but for rows it isn't working even if I use the saming parametrs. How do i generate borders for rowdelegate
?