Unsolved how to connect two models of different tableview
-
i want to show different data on different tableview, the data is ralated. For example, there is a school,which has many classes(show on view1),one class has many students and they have different achievements(show on view2).When I choose a class on view1,view2 will show the students in this class with their achievements.
-
Looks like you want a KSelectionProxyModel
(The KDA APIs do not work only on KDE, don't worry)
If you need a single item you can build the model as a tree and use https://doc.qt.io/qt-5/qtableview.html#setRootIndex