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. QML Drag 'delay'
Forum Updated to NodeBB v4.3 + New Features

QML Drag 'delay'

Scheduled Pinned Locked Moved QML and Qt Quick
3 Posts 2 Posters 2.2k Views 1 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.
  • M Offline
    M Offline
    maksim1979
    wrote on last edited by
    #1

    Hello

    I've just noticed a strange effect. I have a rectangle that I would like to move. The problem is that when I click on it and move mouse, first 5-7 pixels (apparently the size of my cursor) just my cursor is moved and only after that the rectangle itself is moving. May be someone came across with such issue previously?

    Thanks a lot,
    Maxim

    1 Reply Last reply
    0
    • J Offline
      J Offline
      Jens
      wrote on last edited by
      #2

      The "delay" is intentional. It is basically a threshold used by the flickable and drag and drop support in order to determine if the drag is really deliberate or not. Unfortunately in many cases it is not optimal.

      The workaround for now is unfortunately to avoid using drag and directly work with onPositionChanged in MouseArea. But I posted a patch for 5.2 (https://codereview.qt-project.org/#change,63586) which introduces "drag.threshold" as a property of MouseArea in order to override it.

      1 Reply Last reply
      0
      • M Offline
        M Offline
        maksim1979
        wrote on last edited by
        #3

        Jens, thanks a lot for the clarification

        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