Hello,
I am facing the same problem discussed in a previous thread but the thread is quote old so I figured I would start a new discussion. Basically I want to use two table views in a split pane view, with the bottom table showing children of the item selected in the upper one. I would prefer to use the same model in both tables, however the tables need different headers. I am trying to implement a hierarchical model as suggested by wysota in the other thread:
This makes sense, however I don't know how to go about mapping to and from the source index in the proxy model, and how the source index relates to the root index that would be set in the bottom table on a new item selection in the upper table.So you could say that the bottom table show "children" of the item selected in the upper table?
If so, then why not make a proper hierarchical model with parents and children. Then populating the bottom table would be as simple as setting the root index to the index of the item selected in the upper table.
Regardless of your decision, the headers could be changed by using a proxy model over the sqlquery (or your custom) model.
Any help would be appreciated.
Bookmarks