From 8fa59cbec1b572b3314deab58b62087cb2f82850 Mon Sep 17 00:00:00 2001 From: Martchus Date: Tue, 20 Dec 2022 23:03:34 +0100 Subject: [PATCH] Keep compatibility with Qt < 5.11 --- src/GuiSidePanel.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/GuiSidePanel.cpp b/src/GuiSidePanel.cpp index 24de6ec..66917f8 100644 --- a/src/GuiSidePanel.cpp +++ b/src/GuiSidePanel.cpp @@ -281,6 +281,9 @@ void GuiSidePanel::updateTranslate(){ int delta = 0; QFontMetrics fm(w->font()); +#if (QT_VERSION < QT_VERSION_CHECK(5, 11, 0)) // keep compat with Qt < 5.11 +#define horizontalAdvance width +#endif auto *const lb = qobject_cast(w); if (lb) delta=fm.horizontalAdvance(lb->text())-lb->width();