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 Updated to NodeBB v4.3 + New Features

QtQuick DragHandler Lag

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
3 Posts 2 Posters 376 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.
  • K Offline
    K Offline
    KenAppleby 0
    wrote on 17 Mar 2023, 17:59 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 30 Oct 2024, 15:10
    0
    • K KenAppleby 0
      17 Mar 2023, 17:59

      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 30 Oct 2024, 15:10 last edited by
      #2

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

      K 1 Reply Last reply 9 Nov 2024, 20:50
      0
      • S StudentScripter
        30 Oct 2024, 15:10

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

        K Offline
        K Offline
        KenAppleby 0
        wrote on 9 Nov 2024, 20:50 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