title: Glitching when dragging
body: <p>I have a very simple code for drag and drop in <code>qml</code>.</p>
  <p>But when you are dragging the rectangle while holding mouse the screen of window is glitched! and sometimes the color of some <code>Rectangle</code> vanishes.</p>
  <p>Like this <a href="https://bugreports.qt.io/browse/QTBUG-94929" rel="nofollow noreferrer">bug</a> is reported, but not answered.</p>
  <pre><code>import QtQuick 2.12
  import QtQuick.Window 2.12
  import QtQuick.Controls 2.14
  import QtQml.Models 2.1
  
  
  Window {
      id: mainWindow
      width: 700
      height: 800
      visible: true
  
      color: 'grey'
  
      Item {
          anchors.fill: parent
      GridView {
          id: root
          width: 320; height: 480
          cellWidth: 80; cellHeight: 80
          pixelAligned: true
  
          displaced: Transition {
              NumberAnimation { properties: &quot;x,y&quot;; easing.type: Easing.OutQuad }
          }
  
          model: DelegateModel {
              id: visualModel
              model: ListModel {
                  id: colorModel
                  ListElement { color: &quot;blue&quot; }
                  ListElement { color: &quot;green&quot; }
                  ListElement { color: &quot;red&quot; }
                  ListElement { color: &quot;yellow&quot; }
                  ListElement { color: &quot;orange&quot; }
                  ListElement { color: &quot;purple&quot; }
                  ListElement { color: &quot;cyan&quot; }
                  ListElement { color: &quot;magenta&quot; }
                  ListElement { color: &quot;chartreuse&quot; }
                  ListElement { color: &quot;aquamarine&quot; }
                  ListElement { color: &quot;indigo&quot; }
                  ListElement { color: &quot;black&quot; }
                  ListElement { color: &quot;lightsteelblue&quot; }
                  ListElement { color: &quot;violet&quot; }
                  ListElement { color: &quot;grey&quot; }
                  ListElement { color: &quot;springgreen&quot; }
                  ListElement { color: &quot;salmon&quot; }
                  ListElement { color: &quot;blanchedalmond&quot; }
                  ListElement { color: &quot;forestgreen&quot; }
                  ListElement { color: &quot;pink&quot; }
                  ListElement { color: &quot;navy&quot; }
                  ListElement { color: &quot;goldenrod&quot; }
                  ListElement { color: &quot;crimson&quot; }
                  ListElement { color: &quot;teal&quot; }
              }
              delegate: DropArea {
                  id: delegateRoot
  
                  width: 80; height: 80
  
                  onEntered: visualModel.items.move(drag.source.visualIndex, icon.visualIndex)
                  property int visualIndex: DelegateModel.itemsIndex
                  Binding { target: icon; property: &quot;visualIndex&quot;; value: visualIndex }
  
                  Rectangle {
                      id: icon
                      property int visualIndex: 0
                      width: 72; height: 72
                      anchors {
                          horizontalCenter: parent.horizontalCenter;
                          verticalCenter: parent.verticalCenter
                      }
                      radius: 3
                      color: model.color
  
                      Text {
                          anchors.centerIn: parent
                          color: &quot;white&quot;
                          text: parent.visualIndex
                      }
  
                      DragHandler {
                          id: dragHandler
                      }
  
                      Drag.active: dragHandler.active
                      Drag.source: icon
                      Drag.hotSpot.x: 36
                      Drag.hotSpot.y: 36
  
                      states: [
                          State {
                              when: icon.Drag.active
                              ParentChange {
                                  target: icon
                                  parent: root
                              }
  
                              AnchorChanges {
                                  target: icon
                                  anchors.horizontalCenter: undefined
                                  anchors.verticalCenter: undefined
                              }
                          }
                      ]
                  }
              }
          }
      }}
  
  }
  </code></pre>
  <p>Before:</p>
  <p><a href="https://i.stack.imgur.com/iIdVN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iIdVN.png" alt="Before" /></a></p>
  <p>After:</p>
  <p><a href="https://i.stack.imgur.com/6eYAk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6eYAk.png" alt="After drag" /></a></p>