fix: suppress paintEngine warnings from mpv native window embedding

This commit is contained in:
2026-04-06 20:28:00 +02:00
parent 025d5afe1f
commit 39bbfedb9d
+5
View File
@@ -452,6 +452,11 @@ class MpvWidget(QFrame):
self.setAttribute(Qt.WidgetAttribute.WA_PaintOnScreen, True) self.setAttribute(Qt.WidgetAttribute.WA_PaintOnScreen, True)
self._player = None self._player = None
def paintEngine(self):
# mpv owns the native window; Qt has no paint engine here.
# Returning None suppresses the "paintEngine == 0" warnings.
return None
def _init_player(self): def _init_player(self):
if self._player is not None: if self._player is not None:
return return