def mouseReleaseEvent(self, event): """Manage the mouse releasing. Args: event(QMouseEvent): Mouse event. """ QGraphicsView.mouseReleaseEvent(self, event)
def mouseReleaseEvent(self, *args, **kwargs): # reset everything back to default state # reset gradient self.__hideRGBACrosshair(False) self.__hideLinearCrosshair(True) self.scene().gradient_type = attrs.RGBA self.scene().drawGradient() # reset picking attrs self._picking = False self._black_select = False # reset cursor self.unsetCursor() QCursor.setPos(self._orig_pos) # disable labels color_gradient_widget = getWidgetAncestor(self, ColorGradientDelegate) color_arg_widgets_dict = color_gradient_widget.header_widget.getWidgetDict() for color_arg in color_arg_widgets_dict: color_arg_widgets_dict[color_arg].setSelected(False) # update rgba crosshair pos self.scene().updateRGBACrosshair() return QGraphicsView.mouseReleaseEvent(self, *args, **kwargs)
def mouseReleaseEvent(self, e): QGraphicsView.mouseReleaseEvent(self, e) if e.button() == Qt.LeftButton: self.setDragMode(QGraphicsView.NoDrag)
def mouseReleaseEvent(self, event): event.ignore() QGraphicsView.mouseReleaseEvent(self, event)