Ignore:
Timestamp:
Nov 7, 2017 8:29:59 AM (7 years ago)
Author:
Piotr Rozyczko <rozyczko@…>
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
Message:

More Qt5 related fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Perspectives/Fitting/ViewDelegate.py

    r6280464 r412e069e  
    44 
    55import 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 point 
    10     """ 
    11     pass 
    126 
    137class ModelViewDelegate(QtWidgets.QStyledItemDelegate): 
     
    8781        if index.column() == self.param_value: #only in the value column 
    8882            editor = QtWidgets.QLineEdit(widget) 
    89             validator = QtGui.QDoubleValidator() 
     83            validator = GuiUtils.DoubleValidator() 
    9084            editor.setValidator(validator) 
    9185            return editor 
     
    168162        elif index.column() in self.editableParameters(): 
    169163            self.editor = QtWidgets.QLineEdit(widget) 
    170             validator = QtGui.QDoubleValidator() 
     164            validator = GuiUtils.DoubleValidator() 
    171165            self.editor.setValidator(validator) 
    172166            return self.editor 
     
    246240        if index.column() in self.editableParameters(): 
    247241            editor = QtWidgets.QLineEdit(widget) 
    248             validator = QtGui.QDoubleValidator() 
     242            validator = GuiUtils.DoubleValidator() 
    249243            editor.setValidator(validator) 
    250244            return editor 
Note: See TracChangeset for help on using the changeset viewer.