diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp index 4045caca770..a1824a1df7b 100644 --- a/src/widgets/styles/qstylesheetstyle.cpp +++ b/src/widgets/styles/qstylesheetstyle.cpp @@ -3928,10 +3928,9 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q if (qobject_cast(w)) drawCheckMark = false; // ignore the checkmarks provided by the QComboMenuDelegate #endif - int textRectOffset = 0; + int textRectOffset = m->maxIconWidth; if (!mi.icon.isNull()) { renderMenuItemIcon(&mi, p, w, opt->rect, subRule); - textRectOffset = m->maxIconWidth; } else if (drawCheckMark) { const bool checkable = mi.checkType != QStyleOptionMenuItem::NotCheckable; const bool checked = checkable ? mi.checked : false;