I have a similar problem, but maybe the bug should related to the datamodel.
please try this:
disable the FocusFollowMouse
open the grid, right mouse click and set up a filter, the click ok: it raises an assertion in qvector?
If yes, I have your same problem and it is probably a grid bug
If not, probably I have a problem of my datamodel.
Yes, they works.
The model that doesn't work is specific for banded grid dataset.. but seems that the implementation lacks of any methods needed to work perfectly.
That model has two side effects: one, clicking on clomun header for apply the sort built-in function, it acts on the dataset like a filter. Only one row, the first, is shown.
Second, if apply any filter, it raise a QVector assection..
Any idea to implements a correct Model? I already look into the demos srcs of titangrid.
Last edit: 10 years 1 month ago by corrado valeri. Reason: fix
The bug was an inconsinstency of internal dataset contained in the derived datamodel.
When you make a filter by the titangrid, it call rowcount method of the datamodel: in my case, it returns the size of internal dataset, a std::map.
Because the map was passed by reference in the constructor of the window, after a while the map was released by its parent, external to the scope.
In conclusion: when the filtering called rowcount, the internal std::map reference was yet deallocated and it raises the assertion..
I created a local, private copy of the std::map passed by reference, and all run correctly, filtering too.
Maybe this post can help you to check for the life scope of your dataset or datamodel.