Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-65780

QVideoWidget goes blank when paused and unfocused

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • 5.11.0
    • 5.9.1
    • Multimedia
    • None
    • PyQt5 v5.9 on Windows 10

      A QVideoWidget connected to a QMediaPlayer works fine while playing but when it is paused and the window or widget goes out of focus, the video widget turns solid gray (the color of the window background). When I play the video it becomes visible again. This seems to also happen instantaneously while the video is playing: if another window is selected the video flashes gray, but then immediately displays the next frame. I am using PyQt5 but this is presumably a problem with the underlying Qt library. 

      I posted my video code which exhibits the problem on my computer. It requires Python 3 and PyQt5 (pip install PyQt5) to be installed to run. It should open a window, and if you File -> Open a video file it will play. 

        1. screenshot1.png
          667 kB
          Ryan McCampbell
        2. screenshot2.png
          7 kB
          Ryan McCampbell
        3. video.pyw
          9 kB
          Ryan McCampbell
        For Gerrit Dashboard: QTBUG-65780
        # Subject Branch Project Status CR V

            valentyn.doroshchuk Valentyn Doroshchuk
            rmccampbell Ryan McCampbell
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes