(self, event)
return True
Should the drop event be accepted?
Should the drop event be accepted?
Should the drop event be accepted?
def acceptsDropEvent(self, event):
        """
        Should the drop event be accepted?
        """
        # disallow drag/drops between windows
        if event.source() is not None and \
                event.source().window() is not self.window():
            return False

        mime = event.mimeData()
        vars = mime.property('_items')
        if vars is None:
            return False

        if not all(isinstance(var, self.__acceptedType) for var in vars):
            return False

        event.accept()
        return True
def acceptsDropEvent ( self , event ) : # disallow drag/drops between windows if event . source ( ) is not None and event . source ( ) . window ( ) is not self . window ( ) : return False mime = event . mimeData ( ) vars = mime . property ( '_items' ) if vars is None : return False if not all ( isinstance ( var , self . __acceptedType ) for var in vars ) : return False event . accept ( ) return True