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

QVideoWidget goes blank when paused and unfocused

    XMLWordPrintable

Details

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

    Description

      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. 

      Attachments

        1. screenshot1.png
          screenshot1.png
          667 kB
        2. screenshot2.png
          screenshot2.png
          7 kB
        3. video.pyw
          9 kB

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes