diff --git a/src/plugins/styles/modernwindows/qwindows11style.cpp b/src/plugins/styles/modernwindows/qwindows11style.cpp index b5a82e4dc47..89d53c2b001 100644 --- a/src/plugins/styles/modernwindows/qwindows11style.cpp +++ b/src/plugins/styles/modernwindows/qwindows11style.cpp @@ -1373,9 +1373,12 @@ void QWindows11Style::drawControl(ControlElement element, const QStyleOption *op break; case QStyle::CE_ProgressBarLabel: if (const QStyleOptionProgressBar* progbaropt = qstyleoption_cast(option)) { - QRect rect = subElementRect(SE_ProgressBarLabel, progbaropt, widget); - painter->setPen(progbaropt->palette.text().color()); - painter->drawText(rect, progbaropt->text,progbaropt->textAlignment); + const bool vertical = !(progbaropt->state & QStyle::State_Horizontal); + if (!vertical) { + QRect rect = subElementRect(SE_ProgressBarLabel, progbaropt, widget); + painter->setPen(progbaropt->palette.text().color()); + painter->drawText(rect, progbaropt->text, progbaropt->textAlignment); + } } break; case CE_PushButtonLabel: