Mouse events starving timer on Mac OS X?

  • Has anyone encountered similar issue where mouse move events are getting triggered so often that the timer event end up getting delayed? This is on Qt 5.4.1 and Mac OS X. It's quite difficult to reproduce but when it does, my logging shows the mouse move event for my graphics widget was getting triggered a large number of times before the timer event went off. The timer was set to trigger every 30ms. This usually happens when I am using the trackpad and moving the cursor slowly.

  • Lifetime Qt Champion


    Qt 5.4.1 is pretty old, can you check against a more current version like 5.12.3 or even the latest Qt 5.13 beta ?

    By the way what version of macOS are you running ?

  • Hi,

    We are in the process of updating Qt for future major releases, but for previously released versions of our software, updating Qt would be too big a risk for patch releases.

    We last saw the issue on Mac OS X 10.11 (our software supports Mac OS X 10.7 and above). The issue seems fairly intermittent though.

  • Lifetime Qt Champion

    What is your application doing when the slowdown occurs ?

  • The application allows user to drag a ellipse around a 2D map. On both Windows and Mac, we are seeing a spike to 100% CPU usage of a thread when the ellipse is moved, doing a profile on Windows, most of the calls were mainly the blend_color_argb.

    We did observe something that might be related. On Mac we were testing the issue on a laptop and the lag in the timer during mouse movement seems more obvious (e.g. the timer can be delay by seconds) when the battery is low (around 20%) and the laptop is unplugged. Not sure if there is any power saving features on Mac that might have caused the issue.

  • Lifetime Qt Champion

    What kind of laptop is it ?

  • It's an early 2015 Macbook Air.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.