예제 #1
0
 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()
예제 #2
0
 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