From 8ddfa7592945873281b9a1f2a79a0c8934bd0009 Mon Sep 17 00:00:00 2001 From: mgrojo Date: Wed, 20 Feb 2019 23:24:40 +0100 Subject: [PATCH] Disable word wrapping in the Browse Data table when using Qt 5.2.x In order to work around #1658 (QTBUG-73721) the word wrapping is disabled when compiling with Qt 5.12.x. This workaround will also allow compiling with better macOS dark theme support by using Qt 5.12 (see issues #1493 and #1751 and Qt bug reports: QTBUG-68891 and QTBUG-71020) without affecting builds using previous versions of Qt. --- src/ExtendedTableWidget.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ExtendedTableWidget.cpp b/src/ExtendedTableWidget.cpp index 606e17c7..8bc96d0b 100644 --- a/src/ExtendedTableWidget.cpp +++ b/src/ExtendedTableWidget.cpp @@ -374,6 +374,11 @@ ExtendedTableWidget::ExtendedTableWidget(QWidget* parent) : connect(printAction, &QAction::triggered, [&]() { openPrintDialog(); }); + +#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0) + // This work arounds QTBUG-73721 and should be removed or limited in version scope when it is fixed. + setWordWrap(false); +#endif } void ExtendedTableWidget::reloadSettings()