Please nominate your Qt Champions for 2021!

QVideoWidget does not repaint

  • I am using a QVideoWidget with QMediaPlayer, both are parented to a top-level QWidget.
    The problems I am encountering are :

    1. Loading a video into QMediaPlayer does not display the first frame.
    2. While the video is displayed when doing play() + pause() or setPosition(), it disappears again immediately when :
      a. changing the focus
      b. doing QVideoWidget::hide() and then show()

    I have tried when a paint-event arrives to use QVideoWidget::update(), but this only causes an infinite loop of refreshes. Using QVideoWidget::repaint() during the paint-event sometimes works and sometimes randomly crashes.

    Does anyone know how to reliably make QVideoWidget display its last frame and keep on displaying it?

  • @Harry123 I have the same bug. Have you find any solution since your post ?

Log in to reply