code: def hook_drop(self):
          
          widget = self.widget
          widget.setAcceptDrops(True)
          widget.dragEnterEvent = self.dragEnterEvent
          widget.dragMoveEvent = self.dragMoveEvent
          widget.dragLeaveEvent = self.dragLeaveEvent
          widget.dropEvent = self.dropEvent
docs: Install hooks for drop operations.