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

QStandardItemModel::dropMimeData() regardless of its results, calls QStandardItem::removeRow().

    XMLWordPrintable

Details

    Description

      First I must apologize for not providing any verification using a simplified C++ demo. I do not trust my competence in that language.

      I'm using PyQt 4.6.1 on Linux Mint and PyQt 4.6.2 on Windows XP. I've subclassed QTreeView and QAbstractItemModel and set it up so that the user can re-arrange the tree nodes with drag and drop.

      supportedDropActions() returns Qt.MoveAction

      When dropMimeData() returns False in Mint, removeRows() is NOT called. When it returns True, removeRows() is called. I assume this is the designed functionality. However in Windows XP, regardless of the return value removeRows() is always called.

      Attachments

        1. bugdemo.tar.gz
          4 kB
        2. dnd.tar
          20 kB
        3. draganddroptest_v3_results.txt
          7 kB
        4. draganddroptest_v3.zip
          4 kB
        5. draganddroptest_v4_results.txt
          4 kB
        6. draganddroptest_v4_steps_recorded.zip
          342 kB
        7. draganddroptest_v4.zip
          4 kB
        8. listmodel.zip
          3 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            fletchermoore Fletcher Moore
            Votes:
            11 Vote for this issue
            Watchers:
            16 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes