Hello friends,
is it possible to add/change dynamically TableViewColumns to/from the tableview.
The problem is when I change the datasource of my model the columns is also changing.
In the examples I see only static defined columns
TableView {
id: myTableView
anchors.fill: parent
sortIndicatorVisible: true
frameVisible: true
headerVisible: true
alternatingRowColors: true
TableViewColumn { role: "a"; title: "A"; }
TableViewColumn { role: "b"; title: "B"; }
TableViewColumn { role: "c"; title: "C"; }
model: myModel
...
...
}
TableView {
id: myTableView
anchors.fill: parent
sortIndicatorVisible: true
frameVisible: true
headerVisible: true
alternatingRowColors: true
TableViewColumn { role: "a"; title: "A"; }
TableViewColumn { role: "b"; title: "B"; }
TableViewColumn { role: "c"; title: "C"; }
model: myModel
...
...
}
To copy to clipboard, switch view to plain text mode
Bookmarks