Nested TableView
Unsolved
QML and Qt Quick
-
Hello,
I would like to created a nested TableView for some elements of my main TableView.
For example, if
Rowtitle == ""Brilliance"
, I would like to created a subTableView for this row.ListModel { id: libraryModel ListElement { title: "A Masterpiece" author: "Gabriel" } ListElement { title: "Brilliance" author: "Jens" } ListElement { title: "Outstanding" author: "Frederik" } } TableView { TableViewColumn { role: "title" title: "Title" width: 100 //if title==""Brilliance" create a second tableview } TableViewColumn { role: "author" title: "Author" width: 200 } model: libraryModel }
Do you have any idea how to do it ?
Thanks a lot !
-
-
Hello, thanks for your answer.
I am thinking of using TreeView but my code might change a lot and I just need for some elements to have a nested list of one level so I wanted to know if there was a simple way to do it.This how my data should be most of the time: