|
17 | 17 | from .scale_map import QwtScaleMap |
18 | 18 |
|
19 | 19 | from .qt.QtGui import (QPaintEngine, QFrame, QPixmap, QPainter, QPalette, |
20 | | - QStyle, QPen, QStyleOptionFocusRect, QBrush, |
21 | | - QLinearGradient, QPainterPath, QColor, QStyleOption) |
| 20 | + QStyle, QPen, QStyleOptionFocusRect, QBrush, QRegion, |
| 21 | + QLinearGradient, QPainterPath, QColor, QStyleOption) |
22 | 22 | from .qt.QtCore import Qt, QRect, QPoint, QT_VERSION |
23 | 23 |
|
24 | 24 | QWIDGETSIZE_MAX = (1<<24)-1 |
@@ -389,7 +389,7 @@ def fillPixmap(self, widget, pixmap, offset=None): |
389 | 389 | if widget.autoFillBackground(): |
390 | 390 | qwtFillRect(widget, painter, rect, autoFillBrush) |
391 | 391 | if widget.testAttribute(Qt.WA_StyledBackground): |
392 | | - painter.setClipRegion(rect) |
| 392 | + painter.setClipRegion(QRegion(rect)) |
393 | 393 | opt = QStyleOption() |
394 | 394 | opt.initFrom(widget) |
395 | 395 | widget.style().drawPrimitive(QStyle.PE_Widget, opt, |
|
0 commit comments