(self, index, x_offset)
Handle click events for the first column (call the edit method)
        and the second (call method for changing the palette)
Handle click events for the first column (call the edit method)
        and the second (call method for changing the palette)
Handle click events for the first column ( call the edit method ) and the second ( call method for changing the palette )
def handle_click(self, index, x_offset):
        """
        Handle click events for the first column (call the edit method)
        and the second (call method for changing the palette)
        """
        if self.model().data(index, Qt.EditRole) is None:
            return
        if index.column() == 0 or x_offset > 24:
            self.edit(index)
        else:
            self.change_color(index)
def handle_click ( self , index , x_offset ) : if self . model ( ) . data ( index , Qt . EditRole ) is None : return if index . column ( ) == 0 or x_offset > 24 : self . edit ( index ) else : self . change_color ( index )