fix: suppress QFrame paintEvent on mpv native window
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user