code: def update_dragged_item_flags(self, item):
          
          if int(item.flags() & Qt.ItemIsDropEnabled) \
                  and int(item.flags() & Qt.ItemIsDragEnabled):
              item.setFlags(item.flags() & ~Qt.ItemIsDropEnabled)
docs: Fix the drop flag after the item is dropped.
  
          Check if it looks like an item dragged from QListWidget
          to QTreeWidget and disable the drop flag.
          For some reasons the flag is set when dragging.
  
          :param item: Item which is dragged.
          :type item: QTreeWidgetItem
  
          .. note:: This is a slot executed when the item change.