效果如下:
使用案例:
TableViewCtrl2Data {
id: idTableViewCtrl2Data
arrKey: ["date", "shift", "totalNum", "okNum", "ngNum", "firstPassRate", "scanCodeNgNum","mesErrorNum", "sideTopNgNum", "sideBottomNgNum"]
arrLan: ["日期", "班次", "总数", "OK数", "NG数", "直通率", "扫码NG", "MES异常", "top面", "bottom面"]
arrWidth: [200, 200, 80, 80, 110, 830, 200, 200]
rowNums: 18
columnHeight: 35
Component.onCompleted: {
tableWidth = getArrWidth()
tableHeight = getArrHeight()
}
}
带有表头的数据列表,完整代码如下