hi @dmitriano
Window {
visible: true
width: 640
height: 480
title: qsTr("Hello World")
TableView {
anchors.fill: parent
columnSpacing: 1
rowSpacing: 1
clip: true
model: TableModel {}
delegate: DelegateChooser {
role: "type"
DelegateChoice {
roleValue: "lab2"
delegate: Rectangle {
Text {
id: label2
text: "type delegate"
}
}
}
DelegateChoice {
// roleValue: "String" // default delegate
delegate: Rectangle {
color: ms.containsMouse ? "#d2cc01" : "lightgrey"
MouseArea{
anchors.fill: parent
hoverEnabled: true
id:ms
}
implicitWidth: defaultLabel.implicitWidth + 8
implicitHeight: defaultLabel.implicitHeight + 4
Text {
id: defaultLabel
text: tabledata
}
}
}
}
}
}