Qt World Summit: Register Today!

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?

  • This issue is still there today. I have drag.smoothed set to false and drag.threshold set to 0 but it does not seem to be fixing it

  • Loving the attitudes here.......waiting for someone else to provide a fix, yet not one of you have bothered posting a code snippet for 'us' to look at or play with. Help us help you, the more info you give, the better the help is likely to be and if dragthreshold doesn't work, why are only 5 people complaining about it?, I suggest your code is mising something.

Log in to reply