From 8905693dd9b13a0bb6585e6cb191d781aab43bd5 Mon Sep 17 00:00:00 2001 From: Peery Date: Sun, 30 Jan 2022 22:09:15 +0100 Subject: [PATCH] Fixed Bug when switching from video media Fixed an issue where the QVideoWidget was hidden when switching away from a video but never shown again when switching back to anyone. --- ArtNet/gui/window.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ArtNet/gui/window.py b/ArtNet/gui/window.py index 3ebc292..e18000a 100644 --- a/ArtNet/gui/window.py +++ b/ArtNet/gui/window.py @@ -544,7 +544,10 @@ class Window(QtWidgets.QMainWindow): self.__pixmap.frameChanged.connect(self.on_movie_frame_changed) elif file_ending in ["webm", "mp4", "mov", "mkv"]: self.__showing_video = True - self.__video = QVideoWidget() if self.__video is None else self.__video + if isinstance(self.__video, QVideoWidget): + self.__video.show() + else: + self.__video = QVideoWidget() if self.__video is None else self.__video self.__player = QtMultimedia.QMediaPlayer(None, QtMultimedia.QMediaPlayer.VideoSurface) self.__player.setVideoOutput(self.__video) self.__player.setMedia(QtMultimedia.QMediaContent(QUrl.fromLocalFile(full_path)))