Skip to content

Commit

Permalink
TableView: Trigger the resizing of editors resizing a row/column
Browse files Browse the repository at this point in the history
If there is an editor in the table then this needs to be updated as
the resize happens, otherwise it will not adapt to the new size
correctly and can appear drawn over other cells.

Fixes: QTBUG-85484
Pick-to: 5.15 6.0
Change-Id: I918c37f1ee1b0614c03c6b38f95f0f8b35a571f2
Reviewed-by: Samuel Gaist <[email protected]>
  • Loading branch information
AndyShawQt committed Jan 5, 2021
1 parent 0cbbba2 commit 9d36ee1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/widgets/itemviews/qtableview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3010,6 +3010,8 @@ void QTableView::timerEvent(QTimerEvent *event)
updateGeometries();
killTimer(d->columnResizeTimerID);
d->columnResizeTimerID = 0;
} else {
updateEditorGeometries();
}

QRect rect;
Expand Down Expand Up @@ -3038,6 +3040,8 @@ void QTableView::timerEvent(QTimerEvent *event)
updateGeometries();
killTimer(d->rowResizeTimerID);
d->rowResizeTimerID = 0;
} else {
updateEditorGeometries();
}

int viewportHeight = d->viewport->height();
Expand Down

0 comments on commit 9d36ee1

Please sign in to comment.