On 29 July 2016 at 22:25, william.croc...@analog.com <william.croc...@analog.com> wrote: > Hello: > > This is a desk top widgets question. > No QML here. > > I have two QTreeView instances. > They both use the same base model, > but differ in subsequent layers of proxy models. > > What is the most convenient way to keep then in sync. > When an index is selected in one, I want the corresponding > index to be selected in the other. Same with expanding and > collapsing. (I realize that use of a proxy model may cause > items to be omitted from one of the views, so the above only > applies to items which are common to both.)
KF5 has a solution for that. I'm not an Model/View expert, but i think this is what you're looking for: https://api.kde.org/frameworks/kitemmodels/html/classKLinkItemSelectionModel.html Chris > > Thanks. > > Bill > _______________________________________________ > Interest mailing list > Interest@qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest