Reputation: 45
I have two database tables where there is a one to many relationship. I would like to show the data via model-view architecture in Qt where one clicks the plus sign on the view and the rest of the relational data is displayed below. What is the better way of implementing this? Will QTreeView or QSQLRelationalModel be sufficient for this implementation?
Thx in advance
Upvotes: 0
Views: 325
Reputation: 45
I conducted some search as to the better implementation of this case, and I was able to display two seperate tables via QStandardItemModel and QTreeView. For columns that do not match I just left blank and I increased the number of columns in QStandardItemModel so that it includes the desired columns from both tables. I thought the information might be useful for those looking for an answer for this question.
Sincerely
P.S. My points were decreased by 2 points for this question. I just wonder why my points are decreased for asking a question.
Upvotes: 1