Results 1 to 7 of 7

Thread: Problem wit QTimer, different time, why?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2008
    Posts
    9
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Problem wit QTimer, different time, why?

    Hello!!
    I am implementing one video reproducer and the refresh is 40 ms.
    To make this i use one timer:

    Qt Code:
    1. timer = new QTimer();
    2. connect(timer, SIGNAL(timeout()), this, SLOT(updateLabel()));
    3. timer->start(40);
    4.  
    5. updateLabel()
    6. {
    7. XXXXXXXXXX
    8. Label->setPixmap(QPixmap::fromImage(qimg_l));
    9. }
    To copy to clipboard, switch view to plain text mode 

    But when i load the video the first time is slower than the second, third, ...
    I use for example one refresh of 1s and the video is loaded too the first time at 1s for each frame, but the second, third, faster than the first.
    Why this thing? Any idea?

    Thank you
    Last edited by jpn; 6th August 2008 at 12:10. Reason: missing [code] tags

Similar Threads

  1. PyQt QTimer problem { FIXED }
    By WinchellChung in forum Newbie
    Replies: 0
    Last Post: 1st March 2008, 16:50
  2. QTimer problem
    By vv in forum Qt Programming
    Replies: 9
    Last Post: 3rd July 2007, 08:13
  3. QTimer problem ... it runs but never triggs
    By yellowmat in forum Newbie
    Replies: 4
    Last Post: 4th July 2006, 12:54
  4. Replies: 6
    Last Post: 17th March 2006, 17:48
  5. Problem with pointers while using localtime() and time()
    By jamadagni in forum General Programming
    Replies: 7
    Last Post: 11th January 2006, 15:48

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
  •  
Qt is a trademark of The Qt Company.