code: def dragMoveEvent(self, event):
          
          if (event.mimeData().hasFormat("text/plain")):
              event.setDropAction(Qt.MoveAction)
              event.accept()
          else:
              event.ignore()
docs: Drag and Drop - Move event