From 31f4df4c5bf3dcaf8e02e7313a23c4eacc898785 Mon Sep 17 00:00:00 2001 From: Ethanfel Date: Mon, 6 Apr 2026 20:29:06 +0200 Subject: [PATCH] fix: suppress QFrame paintEvent on mpv native window --- main.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.py b/main.py index ebc3123..ccca79e 100755 --- a/main.py +++ b/main.py @@ -457,6 +457,11 @@ class MpvWidget(QFrame): # Returning None suppresses the "paintEngine == 0" warnings. return None + def paintEvent(self, event): + # QFrame's default paintEvent would call QPainter on this widget, + # which has no engine (mpv owns the surface). Do nothing instead. + pass + def _init_player(self): if self._player is not None: return