Important: Please read the Qt Code of Conduct -

QMediaPlayer setPosition() weird behaviour

  • Hello,

    I am using QMediaPlayer to display a video and I have a step forward button that is supposed to move the video one frame forward.
    Here is the step forward function:

    def next_frame(self):
               self.progress_slider.setSliderPosition(self.progress_slider.value() + self.frame_increment_interval)
               self.player.setPosition(self.player.position() + self.frame_increment_interval)

    but when I click the button it shows a previous frame first (like 100 frames in the past) before it moves to the next frame.
    Any idea why this behaviour exists?


  • Lifetime Qt Champion


    Please do not post the same question on multiple sub-forum.

    One is enough


Log in to reply