Results 1 to 2 of 2

Thread: how to enable drag on a slider ?

  1. #1
    Join Date
    Jul 2010
    Posts
    50
    Thanks
    7
    Platforms
    Windows

    Default how to enable drag on a slider ?

    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.........
    Qt Code:
    1. void VideoDisplayer::func()
    2. {
    3. [.............]
    4.  
    5. connect(localSlider,SIGNAL(sliderReleased()),this,SLOT(setIndex())); //Note that I have used sliderReleased() signal only.Is this the culprit??
    6. [.........]
    7.  
    8. }
    9.  
    10.  
    11.  
    12. void VideoDisplayer::setIndex()
    13. {
    14. //timer->stop();
    15. i=localSlider->sliderPosition();
    16. //playVideo();
    17. }
    To copy to clipboard, switch view to plain text mode 

    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??

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: how to enable drag on a slider ?

    Did you see the Video Widget Example in the docs, I guess it is what you want.

Similar Threads

  1. help on my slider
    By newb in forum Qt Programming
    Replies: 1
    Last Post: 13th July 2010, 15:36
  2. Replies: 3
    Last Post: 10th June 2010, 15:13
  3. Replies: 2
    Last Post: 21st March 2010, 09:01
  4. Rotating a slider...
    By ACFred in forum Newbie
    Replies: 7
    Last Post: 24th February 2008, 15:56
  5. get slider value
    By eric in forum Qt Programming
    Replies: 1
    Last Post: 8th November 2007, 19:47

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.