diff --git a/src/widgets/widgets/qmenu.cpp b/src/widgets/widgets/qmenu.cpp index d704aac525c..c6a130195cf 100644 --- a/src/widgets/widgets/qmenu.cpp +++ b/src/widgets/widgets/qmenu.cpp @@ -472,7 +472,7 @@ void QMenuPrivate::updateActionRects(const QRect &screen) const } max_column_width += tabWidth; //finally add in the tab width - if (!tornoff || (tornoff && scroll)) { // exclude non-scrollable tear-off menu since the tear-off menu has a fixed size + if (!tornoff || scroll) { // exclude non-scrollable tear-off menu since the tear-off menu has a fixed size const int sfcMargin = style->sizeFromContents(QStyle::CT_Menu, &opt, QSize(0, 0), q).width(); const int min_column_width = q->minimumWidth() - (sfcMargin + leftmargin + rightmargin + 2 * (fw + hmargin)); max_column_width = qMax(min_column_width, max_column_width);