def _general_handler(self):
"""
Handler for other values (str, float, int most likely). Parses
QLineEdit.
"""
current = self._select_widget.text()
try:
new_value = self._value_type(current)
color = "#FFFFFF"
self._fit.set_experiment_attr(self._experiment,self._settable_name, new_value,purge_fit=True)
self._current_value = new_value
except ValueError:
color = "#FFB6C1"
self._select_widget.setStyleSheet("QLineEdit {{ background-color: {} }}".format(color))
评论列表
文章目录