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

QListView deletes items with default drop action Move

    XMLWordPrintable

Details

    • c699daeceb4448c4545a67ffdba27bcb3b994114

    Description

      Using a QListView on a form in the designer, with:

      viewMode | IconMode

      defaultDropAction | Move

      movement | Snap

      No longer works since I've updated Qt. The list view deletes the item when dragging over the list view but not on an item. If the default drop action is changed to Copy then the icons no longer have snapped movement and move freely.

       

      I believe the problem is that QListWidget has a default implementation that prevents the deletion on move but QListView does not:

      http://code.qt.io/cgit/qt/qtbase.git/tree/src/widgets/itemviews/qlistwidget.cpp#n1919

      QListView should have the exact same implementation or drag and drop does not work out of the box in the same way that it does for QListWidget. I consider this a bug because QTreeView does not have this problem and works perfectly fine with drag and drop out of the box using a custom model in a similar fashion.

       

      I'm seeing reports of this elsewhere as well:

      http://lists.qt-project.org/pipermail/pyside/2016-August/002429.html

      https://forum.qt.io/topic/30850/qlistview-drag-item-disappears/7

      Definitely seems to be an untriaged bug.

      Attachments

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

        Activity

          People

            chehrlic Christian Ehrlicher
            RobertBColton Robert B. Colton
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes