PDA

View Full Version : how to enable drag on a slider ?



qt_user
3rd August 2010, 12:43
If I have a slider which starts playing a video file(frames) on clicking the playPauseButton...................now when the video is playing, if I want to drag the slider and start playing the video there onwards,..................what is the procedure(short cut) for that? I have implemented it as.........


void VideoDisplayer::func()
{
[.............]

connect(localSlider,SIGNAL(sliderReleased()),this, SLOT(setIndex())); //Note that I have used sliderReleased() signal only.Is this the culprit??
[.........]

}



void VideoDisplayer::setIndex()
{
//timer->stop();
i=localSlider->sliderPosition();
//playVideo();
}


When the value of i(public variable) changes, the video frame number which is being displayed on timer counts also gets changed................ but the problem is that the slider does not get dragged; also the frame also doesn't change............can smbdy offer a solution??

Lykurg
3rd August 2010, 12:58
Did you see the Video Widget Example in the docs, I guess it is what you want.