diff options
Diffstat (limited to 'examples/multimedia/audiosource/audiosource.py')
-rw-r--r-- | examples/multimedia/audiosource/audiosource.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/multimedia/audiosource/audiosource.py b/examples/multimedia/audiosource/audiosource.py index d61aaae7e..8f11e5c4b 100644 --- a/examples/multimedia/audiosource/audiosource.py +++ b/examples/multimedia/audiosource/audiosource.py @@ -119,12 +119,16 @@ class RenderArea(QWidget): painter.drawRect(frame) if self.m_level == 0.0: + # QPainter needs an explicit end() in PyPy. This will become a context manager in 6.3. + painter.end() return pos: int = round((frame.width() - 1) * self.m_level) painter.fillRect( frame.left() + 1, frame.top() + 1, pos, frame.height() - 1, Qt.red ) + # QPainter needs an explicit end() in PyPy. This will become a context manager in 6.3. + painter.end() class InputTest(QWidget): |