Nested TableView
Unsolved
QML and Qt Quick
-
wrote on 14 Apr 2017, 07:58 last edited by
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 !
-
wrote on 14 Apr 2017, 20:38 last edited by
How about using TreeView? You can also use Loader as delegate if you need customization.
b.t.w treeView is quite buggy and for some reason is being ignored by Qt bug fixers. If this stops you of using TreeView, so far I know TableView has similar bugs. -
wrote on 19 Apr 2017, 11:58 last edited by
3/3