From b3431a9553ec11b85b5e91c67b1ebaa6e1bfd59b Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Fri, 8 Aug 2014 14:38:22 +0200 Subject: [PATCH] QFusionStyle paints sliders outside of clip When painting a slider the QFusionStyle overrides the existing clip on QPainter thereby causing itself to be painting unclipped. Changes replace clipping with intersection clipping. Task-number: QTBUG-40530 Change-Id: I0135928c36ca1d23c906cf82c584ded01720b1cc Reviewed-by: Gunnar Sletta --- src/widgets/styles/qfusionstyle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/styles/qfusionstyle.cpp b/src/widgets/styles/qfusionstyle.cpp index 82c53def7d..012f5ea18f 100644 --- a/src/widgets/styles/qfusionstyle.cpp +++ b/src/widgets/styles/qfusionstyle.cpp @@ -2890,7 +2890,7 @@ void QFusionStyle::drawComplexControl(ComplexControl control, const QStyleOption clipRect = QRect(groove.left(), groove.top(), groove.width(), handle.top() - groove.top()); } painter->save(); - painter->setClipRect(clipRect.adjusted(0, 0, 1, 1)); + painter->setClipRect(clipRect.adjusted(0, 0, 1, 1), Qt::IntersectClip); painter->drawPixmap(groove.topLeft(), cache); painter->restore(); }