def METHOD_NAME(self, event):
    """
    The Qt event handler when the mouse is dragged.
    If a slice plane is selected the slice plane is dragged otherwise the scene is rotated.
    :param QMouseEvent event: the qt mouse event
    """
    if self._slice_planes.has_selection():
        x, y = event.x(), event.y()
        m = self.viewMatrix()
        dx = x - self._mouse_pos[0]
        dy = y - self._mouse_pos[1]
        vec = QVector4D(dx, -dy, 0, 0) * m
        dx, dy, dz = vec.x(), vec.y(), vec.z()
        self._mouse_pos = x, y
        self._slice_planes.drag(dx, dy, dz)
        self.slice_changed.emit()
    else:
        return GLViewWidget.METHOD_NAME(self, event)