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

QTreeWidget drag and drop multiple items changes their order

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • 5.8
    • 4.8.x, 5.2.1
    • None
    • Tested on Linux and Windows and happens on both

    Description

      If you create a QTreeWidget with setDragDropMode(QAbstractItemView::InternalMove) and setSelectionMode(QAbstractitemView::ExtendedSelection) and drag multiple items at the same time, when you drop them their order will be reversed.

      I believe that replacing the calls to takeFirst() with takeLast() at the end of void QTreeWidget::dropEvent(QDropEvent *event) in qtreewidget.cpp may fix this but I haven't tried it myself.

      I can write a sample application that demonstrates this if you're not able to reproduce the bug.

      Attachments

        1. treebug.png
          17 kB
          Leo Zide
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            lzide Leo Zide
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes