MCPcopy Create free account
hub / github.com/NSLS2/PyXRF / setBackground

Method setBackground

pyxrf/gui_module/useful_widgets.py:742–755  ·  view source on GitHub ↗

Set background color of the widget. Similar to QTableWidgetItem.setBackground, but accepting a tuple of RGB values instead of QBrush. Parameters ---------- rgb: tuple(int) RGB color in the form of (R, G, B)

(self, rgb)

Source from the content-addressed store, hash-verified

740 self.le_max_value.setAlignment(flags)
741
742 def setBackground(self, rgb):
743 """
744 Set background color of the widget. Similar to QTableWidgetItem.setBackground,
745 but accepting a tuple of RGB values instead of QBrush.
746
747 Parameters
748 ----------
749 rgb: tuple(int)
750 RGB color in the form of (R, G, B)
751 """
752 self.setStyleSheet(get_background_css(rgb, widget="QWidget", editable=False))
753
754 self.le_min_value.setStyleSheet(get_background_css(rgb, widget="QLineEdit", editable=True))
755 self.le_max_value.setStyleSheet(get_background_css(rgb, widget="QLineEdit", editable=True))
756
757 def setTextColor(self, rgb):
758 """

Callers 7

fill_tableMethod · 0.95
fill_eline_tableMethod · 0.80
fill_tableMethod · 0.80
_fill_tableMethod · 0.80
_fill_tableMethod · 0.80
_set_row_colorMethod · 0.80

Calls 2

get_background_cssFunction · 0.85
setStyleSheetMethod · 0.80

Tested by

no test coverage detected