Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QTableView, frozen column
Struggling with a QTableView with frozen column implementation.
It's pretty much a copy/paste of the Frozen Column Example in the documentation.
My problem is that when the column is frozen the vertical scrolling does not sync with the main table.
Especially when add, remove rows in the table (model), as well as setting filter to the model.
Calling the updateFrozenTableGeometry() function in the example works when adding or removing rows. But not when setting filter.
If i resize mainwindow the scrolling gets sync, and all works fine (until changing filter).
Anyone with a solution?
Some signal emitted during mainwindow resize obviously fix my problem, but which one. (update(), repaint() has be tested)
How exactly are you doing the filtering ?
How are you freezing the column ?
I do not have the possibility to share my code.
ChrisW67 last edited by
Are both table views in the frozen column setup are connected to the same QSqlRelationTableModel instance (correct), or have you connected them to two separate instances (not correct) ?
Yes it's the same instance.
I found an ugly fix I think I will go for. Due to struggling enough for now...
When setting filter and frozen column option is active, I manually run hide() then show() on the frozen table view.