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

Class LineEditReadOnly

pyxrf/gui_module/useful_widgets.py:158–171  ·  view source on GitHub ↗

Read-only version of QLineEdit with background set to the same color as the background of the disabled QLineEdit, but font color the same as active QLineEdit.

Source from the content-addressed store, hash-verified

156
157
158class LineEditReadOnly(LineEditExtended):
159 """
160 Read-only version of QLineEdit with background set to the same color
161 as the background of the disabled QLineEdit, but font color the same
162 as active QLineEdit.
163 """
164
165 def __init__(self, *args, **kwargs):
166 super().__init__(*args, **kwargs)
167 self.setReadOnly(True)
168 # Set background color the same as for disabled window.
169 p = self.palette()
170 p.setColor(QPalette.Base, p.color(QPalette.Disabled, QPalette.Base))
171 self.setPalette(p)
172
173
174class TextEditReadOnly(QTextEdit):

Callers 12

_setup_select_elinesMethod · 0.85
__init__Method · 0.85
__init__Method · 0.85
__init__Method · 0.85
__init__Method · 0.85
__init__Method · 0.85
__init__Method · 0.85
_setup_wd_groupMethod · 0.85
_setup_load_groupMethod · 0.85
__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected