Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Mousearea drag lag

Mousearea drag lag

Scheduled Pinned Locked Moved QML and Qt Quick
7 Posts 6 Posters 2.2k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Stado
    wrote on last edited by
    #1

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

    p3c0P 1 Reply Last reply
    0
    • S Stado

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

      p3c0P Offline
      p3c0P Offline
      p3c0
      Moderators
      wrote on last edited by
      #2

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

      157

      1 Reply Last reply
      0
      • S Offline
        S Offline
        Stado
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0
        • J Offline
          J Offline
          jacky_l
          wrote on last edited by
          #4

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

          1 Reply Last reply
          0
          • T Offline
            T Offline
            The Smiling Mickey
            wrote on last edited by The Smiling Mickey
            #5

            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?

            1 Reply Last reply
            0
            • M Offline
              M Offline
              MungaiHaha
              wrote on last edited by
              #6

              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

              1 Reply Last reply
              0
              • MarkkyboyM Offline
                MarkkyboyM Offline
                Markkyboy
                wrote on last edited by
                #7

                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.

                Don't just sit there standing around, pick up a shovel and sweep up!

                I live by the sea, not in it.

                1 Reply Last reply
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved