Table headers drawing issue
-
Hi everyone,
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.
Symptoms:
- 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!
Best Regards,
Daniel Fink -
Hi,
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. -
Hi again,
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 ?
-
@DAnie said in Table headers drawing issue:
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
-
Hi again,
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.