def __init__(self, *arg, **kw): super(FloatEdit, self).__init__(*arg, **kw) self.setSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) self.multiple = multiple() self.setValidator(DoubleValidator()) self._is_multiple = False
def __init__(self, *arg, **kw): super(FloatEdit, self).__init__(*arg, **kw) self.setSizePolicy( QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) self.multiple = multiple() self.setValidator(DoubleValidator()) self._is_multiple = False
def __init__(self, *arg, **kw): self.default_value = 0 self.multiple = multiple() super(TimeZoneWidget, self).__init__(*arg, **kw) self.setRange(-14 * 60, 15 * 60) self.setSingleStep(15) self.setWrapping(True)
def __init__(self, *arg, **kw): super(DropdownEdit, self).__init__(*arg, **kw) self.addItem(self.tr('<clear>'), '<clear>') self.addItem('', None) self.setItemData(1, 0, Qt.UserRole - 1) self.addItem(multiple(), None) self.setItemData(2, 0, Qt.UserRole - 1) self.currentIndexChanged.connect(self._new_value)
def __init__(self, *arg, **kw): super(TimeZoneWidget, self).__init__(*arg, **kw) self.multiple = multiple() self.is_multiple = False self.setRange(45 - (15 * 60), 15 * 60) self.setSingleStep(15) self.setWrapping(True) self.setSpecialValueText(' ')
def __init__(self, *arg, **kw): super(TimeZoneWidget, self).__init__(*arg, **kw) self.multiple = multiple() self.setRange(-14 * 60, 15 * 60) self.setSingleStep(15) self.setWrapping(True) # set fixed width self.setValue(-8 * 60) self.setFixedWidth(super(TimeZoneWidget, self).sizeHint().width())