Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Unsolved QMediaPlayer setPosition() weird behaviour

    General and Desktop
    2
    2
    86
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      sssupply last edited by

      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)
                 return
      

      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?

      Thanks!

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi,

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

        One is enough

        Duplicate

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply Reply Quote 1
        • First post
          Last post