Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Table headers drawing issue
I have a table where the vertical header does not correctly redraw all the time.
It is not repeatable a 100% but pretty consistently.
Often, refreshing the underlying model causes it to break.
- shows graphics artefacts of another tab in the tab view instead of the correct header data.
- scrolling does not refresh the header
- vertical header is unaffected
Can someone point me to the part of QT where I should start looking?
Thanks in advance!
Can you tell us a bit more what you are doing and what exactly is breaking ?
As for poking around, the QHeaderView class seems the thing to look at.
I have two similar tableviews with varying heights of rows. They represent pivot tables.
They were arranged in tabs but I moved them out into horizontal layouts to be viewable at the same time, for testing only.
Ususally the second one is "broken" as you see in the black vertical bar instead of the numbered header view which should be there.
The first one also breaks some time.
It seems to depend on
- the size of the table (number of nows and colums)
- the time it was refreshed (refreshing the data again sometimes breaks it)
I have not subclassed QHeaderView but I use the default one.
At what size do they break ?
sorry for the late reply.
What size are you referring to? Window size or size of one header row?
When I pull the tabs to a separate layout, so that they are visible from the beginning. I get a not 100% repeatable segfault in a QWidget::showChildren call at the moment the window should become visible
segfault in a QWidget::showChildren
What Qt version do you use? If it's 5.12.3 or 5.12.4 please update to 5.12.5
I am actually using 4.8.7 on centos 6
I successfully switched to 5.9.8 but no later because of centos 6 having an older version of glibc
I was able to workaround this issue. It is not very pretty.
I added a recreation of QHeaderView for horizontal and vertical headers to each showEvent() call of the TableView
This fixes the display issues.
So it seems they get deleted in some way that I could not find out.