Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-53734

Clicking while dragging results in the item being moved

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.6.0, 6.5.0 Beta2
    • None
    • Ubuntu 15.04 / OS X 10.11
    • macOS

    Description

      Steps to reproduce:

      1. Execute this code:

      testcase.qml
      import QtQuick 2.4
      
      Item {
          id: root
      
          width: 560
          height: 640
      
          Rectangle {
              color: 'tomato'
              width: parent.width / 10
              height: parent.height / 10
      
              MouseArea {
                  anchors.fill: parent
                  drag.target: parent
                  acceptedButtons: Qt.LeftButton
              }
          }
      }
      

      2. Drag the item
      3. Right click while dragging

      What happens:

      After clicking with the right button of the mouse, the item jumps to other coordinates as soon as we start to move the mouse again. If acceptedButtons is set to Qt.LeftButton | Qt.RightButton instead, it looks like everytime a click happens, the value of drag.threshold need to be reached again before the item can move.

      What should happen:

      The item should ignore any other click while being dragged by the user.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              qt.team.quick.subscriptions Qt Quick and Widgets Team
              bpierre Pierre Bertet
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes