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

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 5.15.2, 6.2.0 Beta3
    • Widgets: Itemviews
    • None
    • Windows 10 x64, both 100% and 125% DPI
    • Windows

      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.)

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

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            nyanpasu64 Nyan Pasu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes