How to merge cells with QML tableView
-
I don't know how to implement this, like void QTableView::setSpan() in qTableView
here is my code example:
TableView {
columnWidthProvider: function (column) { return 80 }
model:
TableModel {
TableModelColumn {
display: "aa"
}
TableModelColumn {
display: "bb"
}
TableModelColumn {
display: "cc"
}
TableModelColumn {
display: "dd"
}
rows: [{ }]
}
delegate: ItemDelegate {
implicitWidth: 80 * 2
implicitHeight: 25
visible:{
if(column % 2 == 1){
return false;
}
return true;
}
background: Rectangle {
color: "#F1F8E9"
border {
color: "#D4D4D4"
width: 1
}
}
}
} //TableView