From ac6bb4af08bd9c0d6364a5f33fd3736d73de3c0b Mon Sep 17 00:00:00 2001 From: Iulian Onofrei Date: Sat, 8 Oct 2016 23:57:45 +0300 Subject: [PATCH] Fix incorrect scrollbar size on macOS with Qt5 Building the project with Qt5 on macOS and browsing a huge table, the scrollbar height was smaller than necessary. Scrolling to the end, some rows were not showing up. This was caused by the default verticall scroll mode, which is set to ScrollPerPixel on macOS, and ScrollPerItem on other systems. --- src/ExtendedTableWidget.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ExtendedTableWidget.cpp b/src/ExtendedTableWidget.cpp index 42c9b1f946..b5ad858a14 100644 --- a/src/ExtendedTableWidget.cpp +++ b/src/ExtendedTableWidget.cpp @@ -64,6 +64,7 @@ ExtendedTableWidget::ExtendedTableWidget(QWidget* parent) : QTableView(parent) { setHorizontalScrollMode(ExtendedTableWidget::ScrollPerPixel); + setVerticalScrollMode(ExtendedTableWidget::ScrollPerItem); connect(verticalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(vscrollbarChanged(int))); connect(this, SIGNAL(clicked(QModelIndex)), this, SLOT(cellClicked(QModelIndex)));