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

QGraphicsSceneDragDropEvent has modifiers only when they have been released

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.12.4
    • GUI: Drag and Drop
    • None
    • Linux/Wayland, Linux/X11

    Description

      To reproduce:

      In KDE dolphin filemanager :

      1. Drag a file
      2. Drop it in another directory while pressing CTRL

      Actual

      • A dialog appears letting you choose whether to move or copy the file

      Expected

      • The file is copied at drop destination

       

      The issue is that QGraphicsSceneDragDropEvent carries modifiers information only once the modifier has been released or when continously pressed.

      This illustrates in two other wrong behaviors.

      In KDE dolphin filemanager :

      1. Drag a file
      2. Press and release Ctrl modifier
      3. Drop it in another directory

      Actual

      • The file is copied at drop destination
      • In DolphinView::slotItemDropEvent QGraphicsSceneDragDropEvent event was:
      • QGraphicsSceneDragDropEvent(proposedAction=CopyAction, possibleActions=CopyAction|MoveAction|LinkAction, source=DolphinMainWindow(0x556d7a24a5b0, name="Dolphin#1"), buttons=LeftButton, ControlModifier, pos=109,510, scenePos=109,510, screenPos=354,584

      Expected

      • A dialog appears letting you choose whether to move or copy the file

       

      In KDE dolphin filemanager :

      1. Drag a file while pressing Ctrl modifier
      2. Release the Ctrl modifier
      3. Drop it in another directory

      Actual

      • The file is copied at drop destination
      • In DolphinView::slotItemDropEvent QGraphicsSceneDragDropEvent event was:
      • QGraphicsSceneDragDropEvent(proposedAction=CopyAction, possibleActions=CopyAction|MoveAction|LinkAction, source=DolphinMainWindow(0x556d7a24a5b0, name="Dolphin#1"), buttons=LeftButton, ControlModifier, pos=157,524, scenePos=157,524, screenPos=402,598

      Expected

      • A dialog appears letting you choose whether to move or copy the file

       

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            meven Méven Car
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes