PDA

View Full Version : QSortFilterProxyModel and search



vr
16th May 2007, 12:51
Hi,

i'm new to qt4's model/view programming and now i need some help with qsortfilterproxymodel.

I'm implementing search function on a qsqltablemodel and want my users to search the whole model together, not a single column only.
Therefore i call setFilterKeyColumn( -1 ) : and nothing happens. The original and the proxy model has exactly the same row count. If a filter column is set, everything works fine.

So, what is the correct way to search/filter the whole model in one step?

Thanks
vr

wysota
16th May 2007, 13:37
I think you have to reimplement filterAcceptsRow() and do your own checking.