Fix compilation with older Qt versions

This commit is contained in:
baldurk
2021-07-01 20:29:46 +01:00
parent 4170e51255
commit a0ec249c75
@@ -490,7 +490,7 @@ void RDTweakedNativeStyle::drawControl(ControlElement control, const QStyleOptio
// elide text from the right if there's not enough space
QFontMetrics metrics(toolopt->font);
int space = metrics.horizontalAdvance(QLatin1Char(' '));
int space = metrics.width(QLatin1Char(' '));
textRect = QStyle::visualRect(opt->direction, rect, textRect);
if(toolopt->toolButtonStyle == Qt::ToolButtonTextOnly)