summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2020-09-12 17:10:19 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-09-13 13:55:46 -0700
commitefdff9fd87d8a4789c32de4cd12e4b51a1da03e1 (patch)
treec8846fcef44685c06e2ddfe4a2d48af02b6f82c7
parenta01ab817139be16906c30f89e16a0a3fbbe026cd (diff)
downloadsubsurface-efdff9fd87d8a4789c32de4cd12e4b51a1da03e1.tar.gz
desktop: fix TableView for Qt 5.15
If we set the size on the QPushButton, the button no longer receives any input (tested on macOS). With this change we get an odd visual artifact when clicking on the 'add' button, but it least it works, so this is good enough for the next release. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--desktop-widgets/tableview.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/desktop-widgets/tableview.cpp b/desktop-widgets/tableview.cpp
index 19aaf602b..2a6a2d535 100644
--- a/desktop-widgets/tableview.cpp
+++ b/desktop-widgets/tableview.cpp
@@ -60,7 +60,10 @@ TableView::TableView(QWidget *parent) : QGroupBox(parent)
iconSize = btnSize - 2*min_gap;
}
plusBtn->setIconSize(QSize(iconSize, iconSize));
+#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
+ // with Qt 5.15, this leads to an inoperable button
plusBtn->resize(btnSize, btnSize);
+#endif
connect(plusBtn, SIGNAL(clicked(bool)), this, SIGNAL(addButtonClicked()));
}