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

QAbstractItemView drop indicator is not updated when shift key is pressed

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.4.0
    • 4.8.6, 5.3.0
    • GUI: Drag and Drop
    • None
    • Windows, Linux
    • cdbd3c412c62a942aa19823420ffd58de99083b1 (dev, 8.7.2014, 5.4)

    Description

      When dragging an item in QListView (or any other QAbstractItemView subclass) the drop indicator doesn't react on shift key press/release. The indicator is updated only when the viewport is entered. The correct drop action is performed regardless of the shown drop indicator.

      The attached example can be used to demonstrate the problem.

      The problem seems to be related to QAbstractItemView::dragMoveEvent() accepting an event without setting/updating the dropAction. The drop indicator updates correctly if event->acceptProposedAction() is used instead of event->accept() in QAbstractItemView::dragMoveEvent().

      Attachments

        1. ItemViewDragDrop.zip
          1.54 MB
        2. qtbug39822_1.zip
          1 kB
        3. qtbug39822.zip
          3 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kleint Friedemann Kleint
            qtcomsupport Qt Support
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes