Results 1 to 4 of 4

Thread: QTimer delay

  1. #1
    Join Date
    Mar 2009
    Location
    Israel
    Posts
    20
    Thanks
    2
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default QTimer delay

    Hi,
    I have QGLWidget something like QDial .
    I need to calculate widget rotation approximately 5 times in second and I use QTimer for that.
    The problem happen when I start rotate my widget FAST,QTimer timeout suspend until speed of mouse moving is dropping.

    Any suggestion for alternative solution.

  2. #2
    Join Date
    Mar 2008
    Posts
    27
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QTimer delay

    If you havn't already, you might want to take a look at the QBasicTimer class.

    I don't know if it has the same problem, but it might be worth giving it a shot.

    Good luck
    DrDonut

  3. #3
    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: QTimer delay

    This is caused by the way Windows processes events when mouse button is pressed (meaning it doesn't process some of them). Honestly I don't know if there is a workaround for this.
    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.


  4. #4
    Join Date
    Mar 2009
    Posts
    5
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default Re: QTimer delay

    The only code that will be called are handlers for mouse move events. Restructure your code to periodically do required activity from the mouse move event handler. If you on windows you may try to play games with message queue, but that may be messy

Similar Threads

  1. Replies: 8
    Last Post: 27th March 2013, 11:51
  2. Extending QTimer()
    By rishid in forum Qt Programming
    Replies: 3
    Last Post: 7th August 2009, 01:59
  3. Problem in using QHttp with QTimer
    By Ferdous in forum Newbie
    Replies: 2
    Last Post: 6th September 2008, 12:48
  4. QThread/QObject and QTimer
    By swiety in forum Qt Programming
    Replies: 2
    Last Post: 25th January 2008, 08:37
  5. Replies: 5
    Last Post: 6th March 2007, 05:34

Tags for this Thread

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.