Slider position update
-
wrote on 29 Jul 2016, 22:45 last edited by
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?
-
welcome to the forum. You can use the sliders setValue function to update the slider position and use positionChanged Signal ?
-
welcome to the forum. You can use the sliders setValue function to update the slider position and use positionChanged Signal ?
wrote on 30 Jul 2016, 23:47 last edited by@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.
-
Can you try using the setPosition in MediaPlayer with Slider sliderReleased signal and value() methods ?
-
wrote on 31 Jul 2016, 23:02 last edited by UnitScan 8 Jan 2016, 17:55
[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/ee7b9450EDIT: line 4 in .cpp file is useless, you can delete this
1/5