Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.10.1
-
None
-
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 |
225441,9 | QListView: do not delete item on internal move | dev | qt/qtbase | Status: MERGED | +2 | 0 |