This is more what I expect what from people. All I wanted was the vain hope that somebody on this forum has written a custom sort to replace Qt's item view sort. But instead I get the automatic "post some source code so we can ask inane questions" and then the flames from people like this.
Qt's custom sort filter model is garbage. Its way too slow to use and so I've subclassed it. I don't expect help from this forum because I don't think there's anyone who has actually subclassed the model and written a custom sort that works. I don't think Qt designed the item views well enough to actually do that. If anyone out there has tried this, then they would know what I've been trying to do with it for a year and would maybe have some idea how to work around the Qt internals to get a sort and filter on an item view without using QSortFilterProxy.
Edit:
Thank you. That's a start. So let's say you override the data() and index() functions and of course sort(). The problem for me is the filtering. Nothing I've tried seems to filter it correctly. The last thing I tried a few weeks ago was using setRowHidden on a subclass of the QTreeView. But this seems to randomly lose the filtering. Is this something your familiar with?





Reply With Quote

Bookmarks