def initStyleOption(self, option, index): """ Manupulates the background-color of a cell in the model. :param option: The options parameter :type option: QStyleOptionViewItem :param index: The QModelIndex that will be painted :type index: QModelIndex """ super(LogDelegate, self).initStyleOption(option, index) option.backgroundBrush = QBrush(choose_brush(index))
def initStyleOption(self, option, index): """ Manupulates the background-color of a cell in the model. :param option: The options parameter :type option: QStyleOptionViewItem :param index: The QModelIndex that will be painted :type index: QModelIndex """ super(LogDelegate,self).initStyleOption(option, index) option.backgroundBrush = QBrush(choose_brush(index))
def initStyleOption(self, option, index): """ Manupulates the background-color of a cell in the model. :param option: The options parameter :type option: QStyleOptionViewItem :param index: The QModelIndex that will be painted :type index: QModelIndex """ super(SizeDelegate,self).initStyleOption(option, index) temp = index.model().mapToSource(index) if temp.internalPointer().marked: option.backgroundBrush = QBrush(QColor(255, 165, 0, 70)) else: option.backgroundBrush = QBrush(choose_brush(index))
def initStyleOption(self, option, index): """ Manupulates the background-color of a cell in the model. :param option: The options parameter :type option: QStyleOptionViewItem :param index: The QModelIndex that will be painted :type index: QModelIndex """ super(SizeDelegate, self).initStyleOption(option, index) temp = index.model().mapToSource(index) if temp.internalPointer().marked: option.backgroundBrush = QBrush(QColor(255, 165, 0, 70)) else: option.backgroundBrush = QBrush(choose_brush(index))