aboutsummaryrefslogtreecommitdiffstats
path: root/examples/widgets/tutorials/cannon/t8.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/widgets/tutorials/cannon/t8.py')
-rw-r--r--examples/widgets/tutorials/cannon/t8.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/examples/widgets/tutorials/cannon/t8.py b/examples/widgets/tutorials/cannon/t8.py
index cc54194cf..b02a049cc 100644
--- a/examples/widgets/tutorials/cannon/t8.py
+++ b/examples/widgets/tutorials/cannon/t8.py
@@ -117,6 +117,8 @@ class CannonField(QWidget):
def paintEvent(self, event):
painter = QPainter(self)
painter.drawText(200, 200, f"Angle = {self._current_angle}")
+ # QPainter needs an explicit end() in PyPy. This will become a context manager in 6.3.
+ painter.end()
class MyWidget(QWidget):