def _get_brush(self, color): """Get brush associated to a color.""" if isinstance(color, list) or isinstance(color, tuple): q_color = QtGui.QColor(*color) else: q_color = QtGui.QColor(color) return QtGui.QBrush(q_color)
def _get_brush(self, color): """ Returns a brush for the color. """ result = self._brushes.get(color) if result is None: qcolor = self._get_color(color) result = QtGui.QBrush(qcolor) self._brushes[color] = result return result
def _get_brush(self, color): if isinstance(color, list) or isinstance(color, tuple): q_color = QtGui.QColor(*color) else: q_color = QtGui.QColor(color) return QtGui.QBrush(q_color)