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

setDropAction() is not respected in ItemViews during move operation on MAC

    XMLWordPrintable

    Details

    • Platform/s:
      macOS
    • Commits:
      137cbd1c7200809cc3945c6d4b6deee560cdc9fc (qt/qtbase/5.13)
    • Sprint:
      UI Bug Fixing Q1/2021

      Description

      The Cocoa platform plugin does not respect QDropEvent::setDropAction(). If dropAction is set to Qt::IgnoreAction, even that QTreeWidget::dropEvent deletes the item that has been moved.
      It is working fine with Windows, issue is only on MAC.
      Please refer to the attached sample.

      1. While pressing the appropriate "Move" modifier key (e.g. Cmd on Mac, Shift on Windows),
      2. drag and drop Item F from Folder 2 to Folder 1.
      3. On Windows and Linux, this properly "moves" the item from one folder
      to the other.
      On the Mac, this causes both F and G items from Folder 2 to disappear.

      The use-case for this is to track the items deleted and does not want the base implementation to do the deletion of moved item from the source. Ideally pEvent->setDropAction(Qt::IgnoreAction) should have worked.

        Attachments

          Issue Links

          For Gerrit Dashboard: QTBUG-77427
          # Subject Branch Project Status CR V

            Activity

              People

              Assignee:
              vhilshei Volker Hilsheimer
              Reporter:
              shmittal Shveta Mittal
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:

                  Gerrit Reviews

                  There is 1 open Gerrit change