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. Slider position update

Slider position update

Scheduled Pinned Locked Moved Solved General and Desktop
qsliderqmediaplayer
5 Posts 2 Posters 2.7k 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.
  • U Offline
    U Offline
    UnitScan
    wrote on 29 Jul 2016, 22:45 last edited by
    #1

    Hi. I'm gonna to create a mp3 player with Qt library, I already familiar with object-oriented language and the Qt library, but I have a question: in my player I created a slider to see the progress of the songs. Is there a way to update the slider while playing the audio file?

    1 Reply Last reply
    0
    • D Online
      D Online
      dheerendra
      Qt Champions 2022
      wrote on 30 Jul 2016, 07:33 last edited by
      #2

      welcome to the forum. You can use the sliders setValue function to update the slider position and use positionChanged Signal ?

      Dheerendra
      @Community Service
      Certified Qt Specialist
      http://www.pthinks.com

      U 1 Reply Last reply 30 Jul 2016, 23:47
      3
      • D dheerendra
        30 Jul 2016, 07:33

        welcome to the forum. You can use the sliders setValue function to update the slider position and use positionChanged Signal ?

        U Offline
        U Offline
        UnitScan
        wrote on 30 Jul 2016, 23:47 last edited by
        #3

        @dheerendra Very well. Last question: is there a way to fast forward or rewind a song by clicking on the slider? Beacause now, when I click on the slider the thumbtrack takes only small steps, he does not position where I click.

        1 Reply Last reply
        0
        • D Online
          D Online
          dheerendra
          Qt Champions 2022
          wrote on 31 Jul 2016, 09:33 last edited by
          #4

          Can you try using the setPosition in MediaPlayer with Slider sliderReleased signal and value() methods ?

          Dheerendra
          @Community Service
          Certified Qt Specialist
          http://www.pthinks.com

          1 Reply Last reply
          2
          • U Offline
            U Offline
            UnitScan
            wrote on 31 Jul 2016, 23:02 last edited by UnitScan 8 Jan 2016, 17:55
            #5

            [SOLVED]

            To make thumb slider jump directly at mouse click, use this subclass:

            header file: https://nopaste.me/view/c38f6570
            source file: https://nopaste.me/view/ee7b9450

            EDIT: line 4 in .cpp file is useless, you can delete this

            1 Reply Last reply
            0

            1/5

            29 Jul 2016, 22:45

            • Login

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