QWindows11Style: Don't set FramelessWindowHint for QScrollbar

QScrollbar is a widget and not a window, therefore there is no need to
set the FramelessWindowHint

Fixes: QTBUG-128518
Pick-to: 6.7
Change-Id: I687c708cd4f59c6f09d0ad3c2d3ddcf62c33b11a
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit 7b146e530adc913a1ed49b4d2ba17de787089261)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Wladimir Leuschner 2024-09-13 13:59:28 +02:00 committed by Qt Cherry-pick Bot
parent 12e30532de
commit f1bab31ff5

View File

@ -2118,7 +2118,8 @@ void QWindows11Style::polish(QWidget* widget)
bool layoutDirection = widget->testAttribute(Qt::WA_RightToLeft);
widget->setAttribute(Qt::WA_OpaquePaintEvent,false);
widget->setAttribute(Qt::WA_TranslucentBackground);
widget->setWindowFlag(Qt::FramelessWindowHint);
if (!isScrollBar)
widget->setWindowFlag(Qt::FramelessWindowHint);
widget->setWindowFlag(Qt::NoDropShadowWindowHint);
widget->setAttribute(Qt::WA_RightToLeft, layoutDirection);
widget->setAttribute(Qt::WA_WState_Created, wasCreated);