def __init__(self, *args, **kwargs): """Initialize object.""" super().__init__(*args, **kwargs) locale = QLocale(QLocale.English, country=QLocale.UnitedStates) locale.setNumberOptions(locale.RejectGroupSeparator) self.setLocale(locale) self.setFocusPolicy(Qt.StrongFocus) self.step_exponent = 0 self.app = QApplication.instance()
def createEditor(self, parent, option, index): """Create editor.""" editor = QDoubleSpinBoxPlus(parent) editor.setMinimum(self.mini) editor.setMaximum(self.maxi) editor.setDecimals(self.prec) locale = QLocale(QLocale.English, country=QLocale.UnitedStates) locale.setNumberOptions(locale.RejectGroupSeparator) editor.setLocale(locale) return editor