summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorChristian Ehrlicher <ch.ehrlicher@gmx.de>2018-01-05 22:04:50 +0100
committerChristian Ehrlicher <ch.ehrlicher@gmx.de>2018-01-09 17:54:43 +0000
commit81566ca9aa525e83810994a567fddcdbc9c2d22c (patch)
tree1e3b701ac94a4476628f13fb2e768fa899b1901a /src/widgets
parenta40e2c7d98a5695574bbe5babad904f64cf28efa (diff)
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>
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/itemviews/qheaderview.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/itemviews/qheaderview.cpp b/src/widgets/itemviews/qheaderview.cpp
index a21b8feeb1..50287df6e0 100644
--- a/src/widgets/itemviews/qheaderview.cpp
+++ b/src/widgets/itemviews/qheaderview.cpp
@@ -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)