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

    • Type: Bug
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.12.2, 5.15.0 RC2
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      centos7, windows 10 pro
    • Platform/s:
      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. drag_n_drop_bug.py
          2 kB
        2. qtbug85324.zip
          1 kB
        3. qtbug85324_1.jpg
          qtbug85324_1.jpg
          49 kB
        4. qtbug85324_2.jpg
          qtbug85324_2.jpg
          54 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

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

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes