fix: suppress QFrame paintEvent on mpv native window

This commit is contained in:
2026-04-06 20:29:06 +02:00
parent 39bbfedb9d
commit 31f4df4c5b
+5
View File
@@ -457,6 +457,11 @@ class MpvWidget(QFrame):
# Returning None suppresses the "paintEngine == 0" warnings. # Returning None suppresses the "paintEngine == 0" warnings.
return None 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): def _init_player(self):
if self._player is not None: if self._player is not None:
return return