Results 1 to 2 of 2

Thread: QMediaplayer setposition is wrong

  1. #1
    Join Date
    Feb 2013
    Posts
    1
    Qt products
    Qt4 Qt5

    Default QMediaplayer setposition is wrong

    I want a video play from 20 second to 30 second position and loop in it.
    after mediaplayer->play() I call mediaplayer->setPosition(20*1000), but player still play from 0.
    When I can call setPosition?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QMediaplayer setposition is wrong

    You can only change the position after the video has started playing. Calling play() does not actually start it play but only schedules a play.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. QMediaPlayer problems
    By alenn.masic in forum Qt Programming
    Replies: 1
    Last Post: 25th February 2013, 15:32
  2. QMediaPlayer repeat sound
    By alenn.masic in forum Qt Programming
    Replies: 0
    Last Post: 21st February 2013, 14:46
  3. qtextcursor setposition doesn't work
    By doc_symbiosis in forum Qt Programming
    Replies: 9
    Last Post: 10th October 2012, 08:43
  4. QMediaPlayer seeking in stream
    By n1ghtly in forum Qt Programming
    Replies: 0
    Last Post: 24th August 2012, 13:28
  5. videoplayer problem in qmediaplayer
    By vinayaka in forum Newbie
    Replies: 3
    Last Post: 25th August 2011, 12:44

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.