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

In QTreeWidget, if DragDropMode is set to InternalMove, dragging and dropping an item removes the item on which you dropped the first item

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P1: Critical P1: Critical
    • 5.13
    • 5.12.1
    • None
    • macOS 10.13.6
    • macOS
    • 137cbd1c7200809cc3945c6d4b6deee560cdc9fc

      Wireshark uses Qt as its widget set; we're building Wireshark 3.0 with Qt 5.12.1.

      We have a Columns preference item that pops up a dialog, based on a QTreeWidget, showing a list of the columns in the packet summary pane, with + and - buttons to add new items or remove a selected item.

      We set its DragDropMode to InternalMove, so that dragging and dropping an item lets you reorder the list of columns.  (We also support dragging and dropping columns in the summary pane itself.)

      In a Wireshark version I have installed, using Qt 5.3.2, if I drag-and-drop one of the entries for the column, it moves to the new location.

      In a recent build, using 5.12.1, if I drag-and-drop one of the entries for the column, it erases the column on which the widget thinks it's dropping the item.

      QTBUG-46642 was a similar bug, but for the QListWidget.  I took its test program, tweaked it to add " (list)" after the labels of the QListWidget items and " (tree)" after the labels of the QTreeWidget items to make it more obvious which window was which.  QListWidget appears to behave correctly, but QTreeWidget doesn't - if I try to drag item C between items A and B, item B disappears, leaving only items A and C, and if I try to drag item C into item B, both items B and C disappear.  There is no sign of any of the items being expandable, so it doesn't appear to be that they're inside an un-expanded-but-expandable item.

      (And, yes, we probably should be using QListWidget, as there's no hierarchy for columns; that would work around the bug and keep people from dragging a column inside another column.  I'll look at doing that.)

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            tpochep Timur Pocheptsov
            gharris Guy Harris
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes