aboutsummaryrefslogtreecommitdiffstats
path: root/examples/widgets/tutorials/cannon/t10.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/widgets/tutorials/cannon/t10.py')
-rw-r--r--examples/widgets/tutorials/cannon/t10.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/examples/widgets/tutorials/cannon/t10.py b/examples/widgets/tutorials/cannon/t10.py
index ed3d9fce3..98b5f57fe 100644
--- a/examples/widgets/tutorials/cannon/t10.py
+++ b/examples/widgets/tutorials/cannon/t10.py
@@ -138,6 +138,8 @@ class CannonField(QWidget):
painter.drawPie(QRect(-35, -35, 70, 70), 0, 90 * 16)
painter.rotate(-self._current_angle)
painter.drawRect(QRect(33, -4, 15, 8))
+ # QPainter needs an explicit end() in PyPy. This will become a context manager in 6.3.
+ painter.end()
def cannon_rect(self):
result = QRect(0, 0, 50, 50)