Bug with QTableView QSortFilterProxyModel and hidden columns
I'm having a problem with hidden columns on a table. I have a feature that can hide some columns of my table, using the table setColumnHidden function. I also have a QSortFilterProxyModel on this table that I use for hiding some rows according to a context. So I implemented the filterAcceptsRow function in my QSortFilterProxyModel. When my context changes, I call an invalidate on my QSortFilterProxyModel to hide some rows.
My problem is that often (this is not a reproducible bug every time), the invalidate call shows the columns that were hidden!
I specify that I do not have any particular threading. Everything is in the main thread.
Someone would have an idea about this bug ?!
What's the source model? A custom one?
The first thing I'd look at is if the source model either resets or the count of columns returns a number <= the index of the hidden column any time
Yes, it's a custom source model too. There is no reset of the model. Column counts also valid.
Edit : I also have the impression that the display of hidden columns is only done if row1 has been hidden by the invalidate. Really strange. I have the feeling that it is a Qt bug ... :(
Can you reproduce that with a minimal compilable example ?
When it happens with Qt5.9.4 or 5.10.0 (not sure about 5.10.1) then it's most likely QTBUG-65478
Most likely. For reference the complete link: https://bugreports.qt.io/browse/QTBUG-65478