Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QMediaPlayer::positionChanged(qint64)
QtWS25 Last Chance

QMediaPlayer::positionChanged(qint64)

Scheduled Pinned Locked Moved Unsolved General and Desktop
qsliderqmediaplayerqt5.5.0
5 Posts 3 Posters 4.6k Views
  • 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.
  • L Offline
    L Offline
    Lorence
    wrote on last edited by Lorence
    #1

    why is this signals only emitted every second?
    is there a signal for qmediaplayer that returns every millisecond or microsecond?

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      well
      the docs
      http://doc.qt.io/qt-5/qmediaplayercontrol.html#position
      says it only sent when when something happens.

      You could hook up your own timer to your own function and call
      qint64 QMediaPlayerControl::position() const

      L 1 Reply Last reply
      0
      • Chris KawaC Offline
        Chris KawaC Offline
        Chris Kawa
        Lifetime Qt Champion
        wrote on last edited by
        #3

        You can change the update notification rate of the media object with setNotifyInterval(). 1s is just the default.
        If you're using it for something like ui update make sure you're not going below what most displays can actually handle (~16ms).

        L 1 Reply Last reply
        1
        • Chris KawaC Chris Kawa

          You can change the update notification rate of the media object with setNotifyInterval(). 1s is just the default.
          If you're using it for something like ui update make sure you're not going below what most displays can actually handle (~16ms).

          L Offline
          L Offline
          Lorence
          wrote on last edited by Lorence
          #4

          @Chris-Kawa @mrjj
          sorry for the late reply,
          thanks guys it now works using setnotifyinterval() :)

          1 Reply Last reply
          0
          • mrjjM mrjj

            Hi
            well
            the docs
            http://doc.qt.io/qt-5/qmediaplayercontrol.html#position
            says it only sent when when something happens.

            You could hook up your own timer to your own function and call
            qint64 QMediaPlayerControl::position() const

            L Offline
            L Offline
            Lorence
            wrote on last edited by
            #5
            This post is deleted!
            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved