code: def hook_drag(self):
          
          widget = self.widget
          widget.mousePressEvent = self.mousePressEvent
          widget.mouseMoveEvent = self.mouseMoveEvent
          widget.mouseReleaseEvent = self.mouseReleaseEvent
docs: Install the hooks for drag operations.