diff --git a/ThirdParty/GUI/qt-manhattan-style/stylehelper.cpp b/ThirdParty/GUI/qt-manhattan-style/stylehelper.cpp index 63ccb3d4b32c1bff74f0925af656911d781677cc..af547b2eb9777c7aa9f1b0bf42d0685fea3d67fd 100644 --- a/ThirdParty/GUI/qt-manhattan-style/stylehelper.cpp +++ b/ThirdParty/GUI/qt-manhattan-style/stylehelper.cpp @@ -468,7 +468,12 @@ void StyleHelper::drawIconWithShadow(const QIcon& icon, const QRect& rect, QPain // tmp); // Draw the actual pixmap... +#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) int space = p->fontMetrics().horizontalAdvance('M') * 0.05; +#else + int space = p->fontMetrics().width('M') * 0.05; +#endif + cachePainter.drawPixmap( QRect(QPoint(radius, radius) + offset, QSize(px.width(), px.height())) .marginsRemoved(QMargins(space, space, space, space)),