Changeset 412e069e in sasview for src/sas/qtgui/Perspectives/Fitting/ViewDelegate.py
- Timestamp:
- Nov 7, 2017 8:29:59 AM (7 years ago)
- Branches:
- ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
- Children:
- 3e8dee3
- Parents:
- 6280464
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Fitting/ViewDelegate.py
r6280464 r412e069e 4 4 5 5 import sas.qtgui.Utilities.GuiUtils as GuiUtils 6 7 class CommaLessValidator(QtGui.QDoubleValidator):8 """9 Custom double validator which doesn't allow for commas to be used as decimal point10 """11 pass12 6 13 7 class ModelViewDelegate(QtWidgets.QStyledItemDelegate): … … 87 81 if index.column() == self.param_value: #only in the value column 88 82 editor = QtWidgets.QLineEdit(widget) 89 validator = QtGui.QDoubleValidator()83 validator = GuiUtils.DoubleValidator() 90 84 editor.setValidator(validator) 91 85 return editor … … 168 162 elif index.column() in self.editableParameters(): 169 163 self.editor = QtWidgets.QLineEdit(widget) 170 validator = QtGui.QDoubleValidator()164 validator = GuiUtils.DoubleValidator() 171 165 self.editor.setValidator(validator) 172 166 return self.editor … … 246 240 if index.column() in self.editableParameters(): 247 241 editor = QtWidgets.QLineEdit(widget) 248 validator = QtGui.QDoubleValidator()242 validator = GuiUtils.DoubleValidator() 249 243 editor.setValidator(validator) 250 244 return editor
Note: See TracChangeset
for help on using the changeset viewer.