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

When I call setDragDropOverwriteMode(true) on a QListWidget, dragging an item half an item down creates an empty item

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 5.15.2, 6.2.0 Beta3
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      Windows 10 x64, both 100% and 125% DPI
    • Platform/s:
      Windows

      Description

      Sample project at https://github.com/nyanpasu64/qt6-dpi-fail/tree/qlistwidget. The core of the code:

      auto w = new QListWidget;
      w->setDragDropMode(QAbstractItemView::InternalMove);
      w->setDragDropOverwriteMode(true);
      w->addItem("hello");
      w->addItem("world");
      

      When I click the "hello" item, then drag it half an item down to release it on the upper half of the "world" item below it, then an empty item is spawned above the "hello" item and remains selected. This can be repeated to spawn many empty items in the QListWidget.

      Video attached. (Ignore the mouse cursor glitching up, this resulted from logging in at 125% DPI and switching to 100% DPI, then recording in ShareX. The bug occurs at 100% DPI as well.)

        Attachments

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

          Activity

            People

            Assignee:
            dfaure_kdab David Faure
            Reporter:
            nyanpasu64 Nyan Pasu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes