Hi Filip, Thanks for your response. i guess I will do so - a second listed, which is filtered.
2014-03-03 8:33 GMT+01:00 Filip Piechocki <fpiecho...@gmail.com>: > Hi, > I suggest you implement filtering proxy model which will be between GridView > and you model. Then you should use this filtering model in the GridView. To > create your filtering model subclass QSortFilterProxyModel and reimplement > filterAcceptsRow(). You can either prepare a new QML type (so you can reuse > it in the future): > > GridView { > model: MyFilteringModel { sourceModel: myPlugin.stringList } > // ... > } > > Or just expose instance with your string list model set as a source model: > > GridView { > model: myPlugin.filteredStringList > // ... > } > > Best Regards, > Filip > > > On Mon, Mar 3, 2014 at 8:06 AM, Damian Ivanov <damianator...@gmail.com> > wrote: >> >> Hi all, >> >> I have a GridView which gets the model from a QStringlist model from c++ >> GridView{... model:myPlugin.stringList;...} >> >> Now this QStringList may contain by nature duplicates. >> Is there a way I can hide them in the GridView? >> I tried in the delegate to set the item visible=false, this hides the >> item but the cell for it is still reserved and makes and empty cell, >> is it possible to hide/destroy this particular cell? >> >> Thanks in advance!! >> Damian >> _______________________________________________ >> 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 > _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest