QHeaderView: fix visualIndexAt() in rtl-mode

QHeaderView::visualIndexAt() did not calculate the correct position in
right-to-left mode. This lead e.g. to missing vertical grid lines in
QTableView/Widget when scrolling horizontally.

Change-Id: Ia50e5cfd7830a6ad8abd17ff79d9fbb33dc4097c
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
bb10
Christian Ehrlicher 2018-01-05 22:04:50 +01:00
parent a40e2c7d98
commit 81566ca9aa
1 changed files with 1 additions and 1 deletions

View File

@ -620,7 +620,7 @@ int QHeaderView::visualIndexAt(int position) const
return -1;
if (d->reverse())
vposition = d->viewport->width() - vposition;
vposition = d->viewport->width() - vposition - 1;
vposition += d->offset;
if (vposition > d->length)