That's exactly what i want! thx very much! 2012/10/29 André Somers <an...@familiesomers.nl>
> Op 29-10-2012 17:12, Tim Bienias schreef: > > Hey guys, > > > > let's say we have one QAbstractListModel consisting of animals in c++. > > There are water- and land-animals within the model. Now i want to > > create a view that does show (1)only the land-animals and a view with > > (2)only the water-animals. There is also a view (3)with some water- > > and some land-animals. > > The views are made with QML/Quick2. > > How can I achieve this? Is it possible to access just some animals of > > the model and show them, or does a view (ListView or whatever) show > > all animals from the model? > > Otherwise i have to create 2 models - one consisting of water-animals > > and one of land-animals, but that's not what i want and it still > > would'nt solve (3). > > Please give me a little hint or link. > > > > cheers, > > tim > Proxy models are the key. Start with considdering QSortFilterProxyModel. > > André > _______________________________________________ > 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