Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. QtQuick DragHandler Lag
Forum Update on Monday, May 27th 2025

QtQuick DragHandler Lag

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
3 Posts 2 Posters 367 Views
  • 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.
  • KenAppleby 0K Offline
    KenAppleby 0K Offline
    KenAppleby 0
    wrote on last edited by
    #1

    With the QtQuick DragHandler there is a noticeable lag between the pointer motion and the target item translation. A rapid drag results in the drag target sliding across the screen to "catch up" with the pointer. A simple test of this is below. The lag is apparent on Windows and Android.

    Is there a way to adjust this behaviour to reduce the lag? Or is this an unavoidable feature of QML?

    import QtQuick 2
    
    Window {
        id: window
        width: 640
        height: 480
        visible: true
    
        Rectangle {
            id: x
            width: 100
            height: 100
            color: "blue"
        }
        DragHandler {
            id: dragHandler
            target: x
        }
    }
    
    
    S 1 Reply Last reply
    0
    • KenAppleby 0K KenAppleby 0

      With the QtQuick DragHandler there is a noticeable lag between the pointer motion and the target item translation. A rapid drag results in the drag target sliding across the screen to "catch up" with the pointer. A simple test of this is below. The lag is apparent on Windows and Android.

      Is there a way to adjust this behaviour to reduce the lag? Or is this an unavoidable feature of QML?

      import QtQuick 2
      
      Window {
          id: window
          width: 640
          height: 480
          visible: true
      
          Rectangle {
              id: x
              width: 100
              height: 100
              color: "blue"
          }
          DragHandler {
              id: dragHandler
              target: x
          }
      }
      
      
      S Offline
      S Offline
      StudentScripter
      wrote on last edited by
      #2

      @KenAppleby-0 Having the same issue as you have. Have you found a solution?

      KenAppleby 0K 1 Reply Last reply
      0
      • S StudentScripter

        @KenAppleby-0 Having the same issue as you have. Have you found a solution?

        KenAppleby 0K Offline
        KenAppleby 0K Offline
        KenAppleby 0
        wrote on last edited by
        #3

        @StudentScripter No, I haven't. But I think it must be possible to improve the performance. If you try the Qt positioning examples that use the QtQuick Map element the responsiveness to drag gestures is good. The Qt documentation states that Map uses OpenGL (ES) but I have not found a way to match the responsiveness of QtQuick Map even using OpenGL.

        However, I find that a QGraphicsView with a QOpenGLWidget viewport performs really well on mobile platforms, even though some people in this forum claim that you can't use QWidgets on them.

        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