Take the style option vertical/horizontal margin into account
for the calculation of the new scroll offset.
Thanks to Frank for pointing out two other problems with "Page Up/Down" and providing
a better way to fix these problems. :)
BUG: 311099
FIXED-IN: 4.11.2
REVIEW: 112678
const qreal headerHeight = m_headerWidget->size().height();
viewGeometry.adjust(0, headerHeight, 0, 0);
}
- const QRectF currentRect = itemRect(index);
+ QRectF currentRect = itemRect(index);
+
+ // Fix for Bug 311099 - View the underscore when using Ctrl + PagDown
+ currentRect.adjust(-m_styleOption.horizontalMargin, -m_styleOption.verticalMargin,
+ m_styleOption.horizontalMargin, m_styleOption.verticalMargin);
if (!viewGeometry.contains(currentRect)) {
qreal newOffset = scrollOffset();