summaryrefslogtreecommitdiffstats
path: root/src/gui/itemviews/qtableview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/itemviews/qtableview.cpp')
-rw-r--r--src/gui/itemviews/qtableview.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/itemviews/qtableview.cpp b/src/gui/itemviews/qtableview.cpp
index 2a937f1..c80faa2 100644
--- a/src/gui/itemviews/qtableview.cpp
+++ b/src/gui/itemviews/qtableview.cpp
@@ -2065,6 +2065,8 @@ int QTableView::sizeHintForRow(int row) const
if (!model())
return -1;
+ ensurePolished();
+
int left = qMax(0, columnAt(0));
int right = columnAt(d->viewport->width());
if (right == -1) // the table don't have enough columns to fill the viewport
@@ -2122,6 +2124,8 @@ int QTableView::sizeHintForColumn(int column) const
if (!model())
return -1;
+ ensurePolished();
+
int top = qMax(0, rowAt(0));
int bottom = rowAt(d->viewport->height());
if (!isVisible() || bottom == -1) // the table don't have enough rows to fill the viewport