Skip to content

PythonQt.QtGui.QSpinBox · declarations 001

Back to PythonQt.QtGui.QSpinBox

cleanText instance-attribute

cleanText: str

Qt 5 reference:

cleanText : const QString

This property holds the text of the spin box excluding any prefix, suffix, or leading or trailing whitespace.

Access functions:

QString cleanText() const

See also text, QSpinBox::prefix, and QSpinBox::suffix.

Source: https://doc.qt.io/archives/qt-5.15/qspinbox.html#cleanText

customContextMenuRequested

customContextMenuRequested(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QSpinBox.customContextMenuRequested; argument details are not documented.

destroyed

destroyed(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QSpinBox.destroyed; argument details are not documented.

displayIntegerBase instance-attribute

displayIntegerBase: int

Qt 5 reference:

displayIntegerBase : int

This property holds the base used to display the value of the spin box

The default displayIntegerBase value is 10.

This property was introduced in Qt 5.2.

Access functions:

int displayIntegerBase() const
void setDisplayIntegerBase(int base)

See also textFromValue() and valueFromText().

Source: https://doc.qt.io/archives/qt-5.15/qspinbox.html#displayIntegerBase

editingFinished

editingFinished(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QSpinBox.editingFinished; argument details are not documented.

event

event(event: Any) -> bool

X.event(event) -> bool

Supplemental documentation: Qt 5 reference:

[override virtual protected] bool QSpinBox::event(QEvent *event)

Reimplements: QAbstractSpinBox::event(QEvent *event).

Upstream PySide2 reference signatures (binding differences may apply):

event(self, event: PySide2.QtCore.QEvent) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qspinbox.html#event

fixup

fixup(str: str) -> None

X.fixup(str)

Supplemental documentation: Qt 5 reference:

[override virtual protected] void QSpinBox::fixup(QString \&input) const

Reimplements: QAbstractSpinBox::fixup(QString \&input) const.

Upstream PySide2 reference signatures (binding differences may apply):

fixup(self, str: str) -> None

Source: https://doc.qt.io/archives/qt-5.15/qspinbox.html#fixup

maximum instance-attribute

maximum: int

Qt 5 reference:

maximum : int

This property holds the maximum value of the spin box

When setting this property the minimum is adjusted if necessary, to ensure that the range remains valid.

The default maximum value is 99.

Access functions:

int maximum() const
void setMaximum(int max)

See also setRange() and specialValueText.

Source: https://doc.qt.io/archives/qt-5.15/qspinbox.html#maximum

minimum instance-attribute

minimum: int

Qt 5 reference:

minimum : int

This property holds the minimum value of the spin box

When setting this property the maximum is adjusted if necessary to ensure that the range remains valid.

The default minimum value is 0.

Access functions:

int minimum() const
void setMinimum(int min)

See also setRange() and specialValueText.

Source: https://doc.qt.io/archives/qt-5.15/qspinbox.html#minimum

objectNameChanged

objectNameChanged(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QSpinBox.objectNameChanged; argument details are not documented.

prefix instance-attribute

prefix: str

Qt 5 reference:

prefix : QString

This property holds the spin box's prefix

The prefix is prepended to the start of the displayed value. Typical use is to display a unit of measurement or a currency symbol. For example:

sb->setPrefix("$");

To turn off the prefix display, set this property to an empty string. The default is no prefix. The prefix is not displayed when value() \=\= minimum() and specialValueText() is set.

If no prefix is set, prefix() returns an empty string.

Access functions:

QString prefix() const
void setPrefix(const QString \&prefix)

See also suffix(), setSuffix(), specialValueText(), and setSpecialValueText().

Source: https://doc.qt.io/archives/qt-5.15/qspinbox.html#prefix

setDisplayIntegerBase

setDisplayIntegerBase(base: int) -> None

X.setDisplayIntegerBase(base)

Upstream PySide2 reference signatures (binding differences may apply):

setDisplayIntegerBase(self, base: int) -> None

Source: https://doc.qt.io/archives/qt-5.15/qspinbox.html#setDisplayIntegerBase

setMaximum

setMaximum(max: int) -> None

X.setMaximum(max)

Upstream PySide2 reference signatures (binding differences may apply):

setMaximum(self, max: int) -> None

Source: https://doc.qt.io/archives/qt-5.15/qspinbox.html#setMaximum

setMinimum

setMinimum(min: int) -> None

X.setMinimum(min)

Upstream PySide2 reference signatures (binding differences may apply):

setMinimum(self, min: int) -> None

Source: https://doc.qt.io/archives/qt-5.15/qspinbox.html#setMinimum

setPrefix

setPrefix(prefix: str) -> None

X.setPrefix(prefix)

Upstream PySide2 reference signatures (binding differences may apply):

setPrefix(self, prefix: str) -> None

Source: https://doc.qt.io/archives/qt-5.15/qspinbox.html#setPrefix

setRange

setRange(min: int, max: int) -> None

X.setRange(min, max)

Supplemental documentation: Qt 5 reference:

void QSpinBox::setRange(int minimum, int maximum)

Convenience function to set the minimum, and maximum values with a single function call.

setRange(minimum, maximum);

is equivalent to:

setMinimum(minimum);
setMaximum(maximum);

See also minimum and maximum.

Upstream PySide2 reference signatures (binding differences may apply):

setRange(self, min: int, max: int) -> None

Source: https://doc.qt.io/archives/qt-5.15/qspinbox.html#setRange

setSingleStep

setSingleStep(val: int) -> None

X.setSingleStep(val)

Upstream PySide2 reference signatures (binding differences may apply):

setSingleStep(self, val: int) -> None

Source: https://doc.qt.io/archives/qt-5.15/qspinbox.html#setSingleStep

setSuffix

setSuffix(suffix: str) -> None

X.setSuffix(suffix)

Upstream PySide2 reference signatures (binding differences may apply):

setSuffix(self, suffix: str) -> None

Source: https://doc.qt.io/archives/qt-5.15/qspinbox.html#setSuffix

setValue

setValue(val: int) -> None

X.setValue(val)

Upstream PySide2 reference signatures (binding differences may apply):

setValue(self, val: int) -> None

Source: https://doc.qt.io/archives/qt-5.15/qspinbox.html#setValue

singleStep instance-attribute

singleStep: int

Qt 5 reference:

singleStep : int

This property holds the step value

When the user uses the arrows to change the spin box's value the value will be incremented/decremented by the amount of the singleStep. The default value is 1. Setting a singleStep value of less than 0 does nothing.

Access functions:

int singleStep() const
void setSingleStep(int val)

Source: https://doc.qt.io/archives/qt-5.15/qspinbox.html#singleStep

stepType instance-attribute

stepType: Any

Qt 5 reference:

stepType : StepType

This property holds the step type.

The step type can be single step or adaptive decimal step.

Access functions:

QAbstractSpinBox::StepType stepType() const
void setStepType(QAbstractSpinBox::StepType stepType)

Source: https://doc.qt.io/archives/qt-5.15/qspinbox.html#stepType

suffix instance-attribute

suffix: str

Qt 5 reference:

suffix : QString

This property holds the suffix of the spin box

The suffix is appended to the end of the displayed value. Typical use is to display a unit of measurement or a currency symbol. For example:

sb->setSuffix(" km");

To turn off the suffix display, set this property to an empty string. The default is no suffix. The suffix is not displayed for the minimum() if specialValueText() is set.

If no suffix is set, suffix() returns an empty string.

Access functions:

QString suffix() const
void setSuffix(const QString \&suffix)

See also prefix(), setPrefix(), specialValueText(), and setSpecialValueText().

Source: https://doc.qt.io/archives/qt-5.15/qspinbox.html#suffix

textChanged

textChanged(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QSpinBox.textChanged; argument details are not documented.

Supplemental documentation: Qt 5 reference:

[signal] void QSpinBox::textChanged(const QString \&text)

This signal is emitted whenever the spin box's text is changed. The new text is passed in text with prefix() and suffix().

This function was introduced in Qt 5.14.

Source: https://doc.qt.io/archives/qt-5.15/qspinbox.html#textChanged

textFromValue

textFromValue(val: int) -> str

X.textFromValue(val) -> str

Supplemental documentation: Qt 5 reference:

[virtual protected] QString QSpinBox::textFromValue(int value) const

This virtual function is used by the spin box whenever it needs to display the given value. The default implementation returns a string containing value printed in the standard way using QWidget::locale().toString(), but with the thousand separator removed unless setGroupSeparatorShown() is set. Reimplementations may return anything. (See the example in the detailed description.)

Note: QSpinBox does not call this function for specialValueText() and that neither prefix() nor suffix() should be included in the return value.

If you reimplement this, you may also need to reimplement valueFromText() and validate()

See also valueFromText(), validate(), and QLocale::groupSeparator().

Upstream PySide2 reference signatures (binding differences may apply):

textFromValue(self, val: int) -> str

Source: https://doc.qt.io/archives/qt-5.15/qspinbox.html#textFromValue

validate

validate(input: str, pos: int) -> Any

X.validate(input, pos)

Supplemental documentation: Qt 5 reference:

[override virtual protected] QValidator::State QSpinBox::validate(QString \&text, int \&pos) const

Reimplements: QAbstractSpinBox::validate(QString \&input, int \&pos) const.

Upstream PySide2 reference signatures (binding differences may apply):

validate(self, input: str, pos: int) -> PySide2.QtGui.QValidator.State

Source: https://doc.qt.io/archives/qt-5.15/qspinbox.html#validate

value instance-attribute

value: int

Qt 5 reference:

value : int

This property holds the value of the spin box

setValue() will emit valueChanged() if the new value is different from the old one. The value property has a second notifier signal which includes the spin box's prefix and suffix.

Access functions:

int value() const
void setValue(int val)

Notifier signal:

void valueChanged(int i)

Source: https://doc.qt.io/archives/qt-5.15/qspinbox.html#value

valueChanged

valueChanged(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QSpinBox.valueChanged; argument details are not documented.

Supplemental documentation: Qt 5 reference:

[signal] void QSpinBox::valueChanged(int i)

This signal is emitted whenever the spin box's value is changed. The new value's integer value is passed in i.

Note: Notifier signal for property value.

Note: Signal valueChanged is overloaded in this class. To connect to this signal by using the function pointer syntax, Qt provides a convenient helper for obtaining the function pointer as shown in this example:

connect(spinBox, QOverload<int>::of(&QSpinBox::valueChanged),
    [=](int i){ /* ... */ });

Source: https://doc.qt.io/archives/qt-5.15/qspinbox.html#valueChanged

valueFromText

valueFromText(text: str) -> int

X.valueFromText(text) -> int

Supplemental documentation: Qt 5 reference:

[virtual protected] int QSpinBox::valueFromText(const QString \&text) const

This virtual function is used by the spin box whenever it needs to interpret text entered by the user as a value.

Subclasses that need to display spin box values in a non-numeric way need to reimplement this function.

Note: QSpinBox handles specialValueText() separately; this function is only concerned with the other values.

See also textFromValue() and validate().

Upstream PySide2 reference signatures (binding differences may apply):

valueFromText(self, text: str) -> int

Source: https://doc.qt.io/archives/qt-5.15/qspinbox.html#valueFromText

windowIconChanged

windowIconChanged(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QSpinBox.windowIconChanged; argument details are not documented.

windowIconTextChanged

windowIconTextChanged(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QSpinBox.windowIconTextChanged; argument details are not documented.

windowTitleChanged

windowTitleChanged(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QSpinBox.windowTitleChanged; argument details are not documented.