We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5ebe14b commit bfd33e2Copy full SHA for bfd33e2
qwt/plot_canvas.py
@@ -157,7 +157,12 @@ def qwtDrawBackground(painter, canvas):
157
if brush.gradient().coordinateMode() == QGradient.ObjectBoundingMode:
158
rects += [canvas.rect()]
159
else:
160
- rects += [painter.clipRegion().rects()]
+ clipregion = painter.clipRegion()
161
+ try:
162
+ rects += [clipregion.rects()]
163
+ except AttributeError:
164
+ # Qt6: no equivalent to 'rects' method...
165
+ rects += [clipregion.begin()]
166
useRaster = False
167
if painter.paintEngine().type() == QPaintEngine.X11:
168
useRaster = True
0 commit comments