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

QStandardItemModel/QTreeView: Drag and Drop internal move of disjunct items (extended selection) is creating additional rows with sort enabled

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.12.2, 5.15.0 RC2
    • None
    • centos7, windows 10 pro
    • Linux/Other display system, Windows

    Description

      I've seem to run into a drag and drop bug using an internal move event that causing the model to add additional rows and offset column data.

      in the example provided(drag_n_drop.py) I can replicate this every time by the following steps explicitly(DO NOT sort the Name column) :
      parent-3 should be the top node.

      1. select child item "4" from parent-3
      2. Ctrl click to select child item "2" from parent-1
      3. drag and drop the two items over the parent-0

      this moves the two rows("4" & "2") and creates two more with no DisplayRole in the name column. The "Tag" & "Color" data from the two item rows are shifted to the additional rows.

      You can close and relaunched the application, now if you sort the Name column where parent-0 is the top node and try the steps again, no additional rows are created.

      Attachments

        1. qtbug85324.zip
          1 kB
        2. qtbug85324_2.jpg
          qtbug85324_2.jpg
          54 kB
        3. qtbug85324_1.jpg
          qtbug85324_1.jpg
          49 kB
        4. drag_n_drop_bug.py
          2 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            crmaurei Cristian Maureira-Fredes
            alexlo Alex Lombardi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes