def dragMoveEvent(self, event):
        """Determines if the widget under the mouse can recieve the drop"""
        super(AbstractDragView, self).dragMoveEvent(event)
        if event.mimeData().hasFormat("application/x-protocol"):
            # find the nearest break to cursor
            self.dragline = self.cursor(event.pos())
            self.viewport().update()
            event.setDropAction(QtCore.Qt.MoveAction)
            event.accept()
        else:
            event.ignore()
def dragMoveEvent ( self , event ) : super ( AbstractDragView , self ) . dragMoveEvent ( event ) if event . mimeData ( ) . hasFormat ( "application/x-protocol" ) : self . dragline = self . cursor ( event . pos ( ) ) self . viewport ( ) . update ( ) event . setDropAction ( QtCore . Qt . MoveAction ) event . accept ( ) else : event . ignore ( )
Determines if the widget under the mouse can recieve the drop