QTableView doesn't show more data whan table is vertically resized
-
I'm having an issue with a QTableView not displaying more data/items when the table is vertically resized. I added a background color to both the table view and the viewport of the table, and it's showing that they're being resized properly.
Oddly, when the widget is horizontally and vertically resized the data shows properly.
-
This post is deleted!
-
Hi,
What version of Qt are you using ?
On what OS ?
What kind of model do you use underneath ?
Can you reproduce that with a minimal compilable example ? -
I found that overriding the resizeEvent() is what's causing the issue. I'm using the resize event to resize the columns so they take up equal widths.
I tried manually setting a fixed height for the table (model->rowCount(...) * rowHeight(0)), but doing this disables scrolling.
Edit: calling the base classes resizeEvent() fixes the issue.
-
And you forgot to call the base class implementation of
resizeEvent
? -
This post is deleted!