Important: Please read the Qt Code of Conduct -

Mousearea drag lag

  • Why does the mousearea lag so far behind the actual mouse position during dragging?

  • Moderators

    @Stado Not sure but can you try setting environment variables as suggested in this QTBUG-33346.

  • This does not seem to be bug because i can see this "effect" in every single qtquick 2 app. It is noticeable even in screencaptures of qml apps on youtube. The lag is omnipresent so to speak. I was quite hopeful that drag.smoothed: false would fix this but it didn't. The problem seems to be in the way qtquick is tracking mouse movement because if i do the naive drag:

    onPositionChanged: {
       draggedRectangle.x = mouse.x
       draggedRectangle.y = mouse.y

    the lag is still there.
    Vsync doesn't seem to be the problem either since it happens every 16.7 (or so) millisec but the lag is longer than that.

  • any solution? same issue i got, mouse drag is so laggy

  • People are still waiting for a solution.
    drag.threshold: 0 does not work.

    Is there a lag before qml gets the mouse position change from the operating system?

    Why has no one provided a fix? You've had plenty of time to fix this problem.

    Edit: Made a test where a rectangle's position was bound to the position of the cursor. There is a clear lag between the mouse move and the rectangle. The lag is either between the operating system and qt or between cpp and qml. I'm inclined to believe, it's between qt and OS because printing the position of the mouse in eventFilter doesn't seem to quite keep up either. What can we do about it?

Log in to reply