(self, index)
Invoke palette editor and set the color
Invoke palette editor and set the color
Invoke palette editor and set the color
def change_color(self, index):
        """Invoke palette editor and set the color"""
        color = self.model().data(index, ColorRole)
        if color is None:
            return
        dlg = QColorDialog(QColor(*color))
        if dlg.exec():
            color = dlg.selectedColor()
            self.model().setData(index, color.getRgb(), ColorRole)
def change_color ( self , index ) : color = self . model ( ) . data ( index , ColorRole ) if color is None : return dlg = QColorDialog ( QColor ( * color ) ) if dlg . exec ( ) : color = dlg . selectedColor ( ) self . model ( ) . setData ( index , color . getRgb ( ) , ColorRole )