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

Abstract Item Views InternalMove Drag-Drop Failing

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 4.7.0
    • 4.6.2
    • Widgets: Itemviews
    • None
    • OSX 10.6
    • 88410105978d5fb4344207cd5d296057ced0f27d

    Description

      On Mac 10.6 the item views have a lot of trouble doing internal move (via drag drop). I'm pretty sure this is a 10.6 issue not a 32/64 bit issue although my app is 64 bit. I added LSArchitecturePriority to designer's Info.plist file to make sure it happened 32 bit as well (but don't know how to verify designer is really running 32 bit in that case).

      Attached is a simple designer file that demonstrates the problem. Just preview the UI and try dragging items to reorder. This works fine on linux and OSX 10.5.

      After testing another day, here's a clue: if I grab the item and quickly jerk the mouse so that the pointer moves far from it, its a lot more likely that the drag will work. It seems like moving the mouse out of the selected item as fast as possible allows the view to accept the drop somehow. Otherwise, it just rejects it.

      More info again: if the mouse ever gets back into the selected (dragging) item the view immediately starts rejecting the drop. So if you quickly move the mouse out of the item and its droppable (as seen by the insert position indicator) and then while still dragging move the dragged item back on top of the original item, the view will suddenly reject the dragging (i.e. the indicator goes away and dropping the item just shows the rejection animation).

      One more thing: this seems to be happening with any subclass of QAbstractItemView. It doesn't seem to be model related. My current code is using QStandardItemModel with a QListView but its obviously happening in designer with QListWidget as well. l first noticed this with a QStandardItemModel with a QTreeView.

      Attachments

        1. bad_reordering_snow_leopard.ui
          1 kB
        2. dragndroptest.zip
          12 kB
        3. patch.diff
          0.4 kB

        Issue Links

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

          Activity

            People

              pullatti Prasanth Ullattil
              jimhourihan Jim Hourihan
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes