PythonQt.QtGui.QAbstractSpinBox · declarations 002
Back to PythonQt.QtGui.QAbstractSpinBox
isReadOnly
isReadOnly() -> bool
X.isReadOnly() -> bool
Upstream PySide2 reference signatures (binding differences may apply):
isReadOnly(self) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qabstractspinbox.html#isReadOnly
keyPressEvent
keyPressEvent(event: Any) -> None
X.keyPressEvent(event)
Supplemental documentation: Qt 5 reference:
[override virtual protected] void QAbstractSpinBox::keyPressEvent(QKeyEvent *event)
Reimplements: QWidget::keyPressEvent(QKeyEvent *event).
This function handles keyboard input.
The following keys are handled specifically:
| Enter/Return | This will reinterpret the text and emit a signal even if the value has not changed since last time a signal was emitted. |
|---|---|
| Up | This will invoke stepBy(1) |
| Down | This will invoke stepBy(-1) |
| Page up | This will invoke stepBy(10) |
| Page down | This will invoke stepBy(-10) |
See also stepBy().
Upstream PySide2 reference signatures (binding differences may apply):
keyPressEvent(self, event: PySide2.QtGui.QKeyEvent) -> None
Source: https://doc.qt.io/archives/qt-5.15/qabstractspinbox.html#keyPressEvent
keyReleaseEvent
keyReleaseEvent(event: Any) -> None
X.keyReleaseEvent(event)
Supplemental documentation: Qt 5 reference:
[override virtual protected] void QAbstractSpinBox::keyReleaseEvent(QKeyEvent *event)
Reimplements: QWidget::keyReleaseEvent(QKeyEvent *event).
Upstream PySide2 reference signatures (binding differences may apply):
keyReleaseEvent(self, event: PySide2.QtGui.QKeyEvent) -> None
Source: https://doc.qt.io/archives/qt-5.15/qabstractspinbox.html#keyReleaseEvent
keyboardTracking
instance-attribute
keyboardTracking: bool
Qt 5 reference:
keyboardTracking : bool
This property holds whether keyboard tracking is enabled for the spinbox.
If keyboard tracking is enabled (the default), the spinbox emits the valueChanged() and textChanged() signals while the new value is being entered from the keyboard.
E.g. when the user enters the value 600 by typing 6, 0, and 0, the spinbox emits 3 signals with the values 6, 60, and 600 respectively.
If keyboard tracking is disabled, the spinbox doesn't emit the valueChanged() and textChanged() signals while typing. It emits the signals later, when the return key is pressed, when keyboard focus is lost, or when other spinbox functionality is used, e.g. pressing an arrow key.
This property was introduced in Qt 4.3.
Access functions:
| bool | keyboardTracking() const |
|---|---|
| void | setKeyboardTracking(bool kt) |
Source: https://doc.qt.io/archives/qt-5.15/qabstractspinbox.html#keyboardTracking
lineEdit
lineEdit() -> Any
X.lineEdit() -> PythonQt.QtGui.QLineEdit
Supplemental documentation: Qt 5 reference:
[protected] QLineEdit *QAbstractSpinBox::lineEdit() const
This function returns a pointer to the line edit of the spin box.
See also setLineEdit().
Upstream PySide2 reference signatures (binding differences may apply):
lineEdit(self) -> PySide2.QtWidgets.QLineEdit
Source: https://doc.qt.io/archives/qt-5.15/qabstractspinbox.html#lineEdit
minimumSizeHint
instance-attribute
minimumSizeHint: QSize
Qt 5 reference:
[override virtual] QSize QAbstractSpinBox::minimumSizeHint() const
Reimplements an access function for property: QWidget::minimumSizeHint.
Source: https://doc.qt.io/archives/qt-5.15/qabstractspinbox.html#minimumSizeHint
mouseMoveEvent
mouseMoveEvent(event: Any) -> None
X.mouseMoveEvent(event)
Supplemental documentation: Qt 5 reference:
[override virtual protected] void QAbstractSpinBox::mouseMoveEvent(QMouseEvent *event)
Reimplements: QWidget::mouseMoveEvent(QMouseEvent *event).
Upstream PySide2 reference signatures (binding differences may apply):
mouseMoveEvent(self, event: PySide2.QtGui.QMouseEvent) -> None
Source: https://doc.qt.io/archives/qt-5.15/qabstractspinbox.html#mouseMoveEvent
mousePressEvent
mousePressEvent(event: Any) -> None
X.mousePressEvent(event)
Supplemental documentation: Qt 5 reference:
[override virtual protected] void QAbstractSpinBox::mousePressEvent(QMouseEvent *event)
Reimplements: QWidget::mousePressEvent(QMouseEvent *event).
Upstream PySide2 reference signatures (binding differences may apply):
mousePressEvent(self, event: PySide2.QtGui.QMouseEvent) -> None
Source: https://doc.qt.io/archives/qt-5.15/qabstractspinbox.html#mousePressEvent
mouseReleaseEvent
mouseReleaseEvent(event: Any) -> None
X.mouseReleaseEvent(event)
Supplemental documentation: Qt 5 reference:
[override virtual protected] void QAbstractSpinBox::mouseReleaseEvent(QMouseEvent *event)
Reimplements: QWidget::mouseReleaseEvent(QMouseEvent *event).
Upstream PySide2 reference signatures (binding differences may apply):
mouseReleaseEvent(self, event: PySide2.QtGui.QMouseEvent) -> None
Source: https://doc.qt.io/archives/qt-5.15/qabstractspinbox.html#mouseReleaseEvent
objectNameChanged
objectNameChanged(*args: Any, **kwargs: Any) -> Any
Native PythonQt.QtGui.QAbstractSpinBox.objectNameChanged; argument details are not documented.
paintEvent
paintEvent(event: Any) -> None
X.paintEvent(event)
Supplemental documentation: Qt 5 reference:
[override virtual protected] void QAbstractSpinBox::paintEvent(QPaintEvent *event)
Reimplements: QWidget::paintEvent(QPaintEvent *event).
Upstream PySide2 reference signatures (binding differences may apply):
paintEvent(self, event: PySide2.QtGui.QPaintEvent) -> None
Source: https://doc.qt.io/archives/qt-5.15/qabstractspinbox.html#paintEvent
readOnly
instance-attribute
readOnly: Any
Qt 5 reference:
readOnly : bool
This property holds whether the spin box is read only.
In read-only mode, the user can still copy the text to the clipboard, or drag and drop the text; but cannot edit it.
The QLineEdit in the QAbstractSpinBox does not show a cursor in read-only mode.
Access functions:
| bool | isReadOnly() const |
|---|---|
| void | setReadOnly(bool r) |
See also QLineEdit::readOnly.
Source: https://doc.qt.io/archives/qt-5.15/qabstractspinbox.html#readOnly
resizeEvent
resizeEvent(event: Any) -> None
X.resizeEvent(event)
Supplemental documentation: Qt 5 reference:
[override virtual protected] void QAbstractSpinBox::resizeEvent(QResizeEvent *event)
Reimplements: QWidget::resizeEvent(QResizeEvent *event).
Upstream PySide2 reference signatures (binding differences may apply):
resizeEvent(self, event: PySide2.QtGui.QResizeEvent) -> None
Source: https://doc.qt.io/archives/qt-5.15/qabstractspinbox.html#resizeEvent
selectAll
selectAll() -> None
X.selectAll()
Supplemental documentation: Qt 5 reference:
[slot] void QAbstractSpinBox::selectAll()
Selects all the text in the spinbox except the prefix and suffix.
Upstream PySide2 reference signatures (binding differences may apply):
selectAll(self) -> None
Source: https://doc.qt.io/archives/qt-5.15/qabstractspinbox.html#selectAll
setAccelerated
setAccelerated(on: bool) -> None
X.setAccelerated(on)
Upstream PySide2 reference signatures (binding differences may apply):
setAccelerated(self, on: bool) -> None
Source: https://doc.qt.io/archives/qt-5.15/qabstractspinbox.html#setAccelerated
setAlignment
setAlignment(arg0: flag) -> None
X.setAlignment(flag)
Upstream PySide2 reference signatures (binding differences may apply):
setAlignment(self, flag: PySide2.QtCore.Qt.Alignment) -> None
Source: https://doc.qt.io/archives/qt-5.15/qabstractspinbox.html#setAlignment
setButtonSymbols
setButtonSymbols(bs: Any) -> None
X.setButtonSymbols(bs)
Upstream PySide2 reference signatures (binding differences may apply):
setButtonSymbols(self, bs: PySide2.QtWidgets.QAbstractSpinBox.ButtonSymbols) -> None
Source: https://doc.qt.io/archives/qt-5.15/qabstractspinbox.html#setButtonSymbols
setCorrectionMode
setCorrectionMode(cm: Any) -> None
X.setCorrectionMode(cm)
Upstream PySide2 reference signatures (binding differences may apply):
setCorrectionMode(self, cm: PySide2.QtWidgets.QAbstractSpinBox.CorrectionMode) -> None
Source: https://doc.qt.io/archives/qt-5.15/qabstractspinbox.html#setCorrectionMode
setFrame
setFrame(arg__1: bool) -> None
X.setFrame(arg__1)
Upstream PySide2 reference signatures (binding differences may apply):
setFrame(self, arg__1: bool) -> None
Source: https://doc.qt.io/archives/qt-5.15/qabstractspinbox.html#setFrame
setGroupSeparatorShown
setGroupSeparatorShown(shown: bool) -> None
X.setGroupSeparatorShown(shown)
Upstream PySide2 reference signatures (binding differences may apply):
setGroupSeparatorShown(self, shown: bool) -> None
Source: https://doc.qt.io/archives/qt-5.15/qabstractspinbox.html#setGroupSeparatorShown
setKeyboardTracking
setKeyboardTracking(kt: bool) -> None
X.setKeyboardTracking(kt)
Upstream PySide2 reference signatures (binding differences may apply):
setKeyboardTracking(self, kt: bool) -> None
Source: https://doc.qt.io/archives/qt-5.15/qabstractspinbox.html#setKeyboardTracking
setLineEdit
setLineEdit(edit: Any) -> None
X.setLineEdit(edit)
Supplemental documentation: Qt 5 reference:
[protected] void QAbstractSpinBox::setLineEdit(QLineEdit *lineEdit)
Sets the line edit of the spinbox to be lineEdit instead of the current line edit
widget. lineEdit cannot be nullptr.
QAbstractSpinBox takes ownership of the new lineEdit
If QLineEdit::validator()
for the lineEdit returns nullptr, the internal validator of the spinbox will be set
on the line edit.
See also lineEdit().
Upstream PySide2 reference signatures (binding differences may apply):
setLineEdit(self, edit: PySide2.QtWidgets.QLineEdit) -> None
Source: https://doc.qt.io/archives/qt-5.15/qabstractspinbox.html#setLineEdit
setReadOnly
setReadOnly(r: bool) -> None
X.setReadOnly(r)
Upstream PySide2 reference signatures (binding differences may apply):
setReadOnly(self, r: bool) -> None
Source: https://doc.qt.io/archives/qt-5.15/qabstractspinbox.html#setReadOnly
setSpecialValueText
setSpecialValueText(txt: str) -> None
X.setSpecialValueText(txt)
Upstream PySide2 reference signatures (binding differences may apply):
setSpecialValueText(self, txt: str) -> None
Source: https://doc.qt.io/archives/qt-5.15/qabstractspinbox.html#setSpecialValueText
setWrapping
setWrapping(w: bool) -> None
X.setWrapping(w)
Upstream PySide2 reference signatures (binding differences may apply):
setWrapping(self, w: bool) -> None
Source: https://doc.qt.io/archives/qt-5.15/qabstractspinbox.html#setWrapping
showEvent
showEvent(event: Any) -> None
X.showEvent(event)
Supplemental documentation: Qt 5 reference:
[override virtual protected] void QAbstractSpinBox::showEvent(QShowEvent *event)
Reimplements: QWidget::showEvent(QShowEvent *event).
Upstream PySide2 reference signatures (binding differences may apply):
showEvent(self, event: PySide2.QtGui.QShowEvent) -> None
Source: https://doc.qt.io/archives/qt-5.15/qabstractspinbox.html#showEvent
showGroupSeparator
instance-attribute
showGroupSeparator: Any
Qt 5 reference:
showGroupSeparator : bool
This property holds whether a thousands separator is enabled. By default this property is false.
This property was introduced in Qt 5.3.
Access functions:
| bool | isGroupSeparatorShown() const |
|---|---|
| void | setGroupSeparatorShown(bool shown) |
Source: https://doc.qt.io/archives/qt-5.15/qabstractspinbox.html#showGroupSeparator
sizeHint
instance-attribute
sizeHint: QSize
Qt 5 reference:
[override virtual] QSize QAbstractSpinBox::sizeHint() const
Reimplements an access function for property: QWidget::sizeHint.
Source: https://doc.qt.io/archives/qt-5.15/qabstractspinbox.html#sizeHint
specialValueText
instance-attribute
specialValueText: str
Qt 5 reference:
specialValueText : QString
This property holds the special-value text
If set, the spin box will display this text instead of a numeric value whenever the current value is equal to minimum(). Typical use is to indicate that this choice has a special (default) meaning.
For example, if your spin box allows the user to choose a scale factor (or zoom level) for displaying an image, and your application is able to automatically choose one that will enable the image to fit completely within the display window, you can set up the spin box like this:
QSpinBox *zoomSpinBox = new QSpinBox;
zoomSpinBox->setRange(0, 1000);
zoomSpinBox->setSingleStep(10);
zoomSpinBox->setSuffix("%");
zoomSpinBox->setSpecialValueText(tr("Automatic"));
zoomSpinBox->setValue(100);
The user will then be able to choose a scale from 1% to 1000% or select "Auto" to leave it up to the application to choose. Your code must then interpret the spin box value of 0 as a request from the user to scale the image to fit inside the window.
All values are displayed with the prefix and suffix (if set), except for the special value, which only shows the special value text. This special text is passed in the QSpinBox::textChanged() signal that passes a QString.
To turn off the special-value text display, call this function with an empty string. The default is no special-value text, i.e. the numeric value is shown as usual.
If no special-value text is set, specialValueText() returns an empty string.
Access functions:
| QString | specialValueText() const |
|---|---|
| void | setSpecialValueText(const QString \&txt) |
Source: https://doc.qt.io/archives/qt-5.15/qabstractspinbox.html#specialValueText
stepBy
stepBy(steps: int) -> None
X.stepBy(steps)
Supplemental documentation: Qt 5 reference:
[virtual] void QAbstractSpinBox::stepBy(int steps)
Virtual function that is called whenever the user triggers a step. The steps parameter
indicates how many steps were taken. For example, pressing Qt::Key_Down will trigger a
call to stepBy(-1), whereas pressing Qt::Key_PageUp will trigger a call to
stepBy(10).
If you subclass QAbstractSpinBox you must reimplement this function. Note that this
function is called even if the resulting value will be outside the bounds of minimum and
maximum. It's this function's job to handle these situations.
See also stepUp(), stepDown(), and keyPressEvent().
Upstream PySide2 reference signatures (binding differences may apply):
stepBy(self, steps: int) -> None
Source: https://doc.qt.io/archives/qt-5.15/qabstractspinbox.html#stepBy
stepDown
stepDown() -> None
X.stepDown()
Supplemental documentation: Qt 5 reference:
[slot] void QAbstractSpinBox::stepDown()
Steps down by one linestep Calling this slot is analogous to calling stepBy(-1);
See also stepBy() and stepUp().
Upstream PySide2 reference signatures (binding differences may apply):
stepDown(self) -> None
Source: https://doc.qt.io/archives/qt-5.15/qabstractspinbox.html#stepDown
stepEnabled
stepEnabled() -> Any
X.stepEnabled()
Supplemental documentation: Qt 5 reference:
[virtual protected] QAbstractSpinBox::StepEnabled QAbstractSpinBox::stepEnabled() const
Virtual function that determines whether stepping up and down is legal at any given time.
The up arrow will be painted as disabled unless (stepEnabled() \& StepUpEnabled) !\= 0.
The default implementation will return (StepUpEnabled| StepDownEnabled) if wrapping is turned on. Else it will return StepDownEnabled if value is > minimum() or'ed with StepUpEnabled if value \< maximum().
If you subclass QAbstractSpinBox you will need to reimplement this function.
See also QSpinBox::minimum(), QSpinBox::maximum(), and wrapping().
Upstream PySide2 reference signatures (binding differences may apply):
stepEnabled(self) -> PySide2.QtWidgets.QAbstractSpinBox.StepEnabled
Source: https://doc.qt.io/archives/qt-5.15/qabstractspinbox.html#stepEnabled
stepUp
stepUp() -> None
X.stepUp()
Supplemental documentation: Qt 5 reference:
[slot] void QAbstractSpinBox::stepUp()
Steps up by one linestep Calling this slot is analogous to calling stepBy(1);
See also stepBy() and stepDown().
Upstream PySide2 reference signatures (binding differences may apply):
stepUp(self) -> None
Source: https://doc.qt.io/archives/qt-5.15/qabstractspinbox.html#stepUp
text
instance-attribute
text: str
Qt 5 reference:
text : const QString
This property holds the spin box's text, including any prefix and suffix
There is no default text.
Access functions:
| QString | text() const |
|---|---|
Source: https://doc.qt.io/archives/qt-5.15/qabstractspinbox.html#text
timerEvent
timerEvent(event: Any) -> None
X.timerEvent(event)
Supplemental documentation: Qt 5 reference:
[override virtual protected] void QAbstractSpinBox::timerEvent(QTimerEvent *event)
Reimplements: QObject::timerEvent(QTimerEvent *event).
Upstream PySide2 reference signatures (binding differences may apply):
timerEvent(self, event: PySide2.QtCore.QTimerEvent) -> None
Source: https://doc.qt.io/archives/qt-5.15/qabstractspinbox.html#timerEvent
validate
validate(input: str, pos: int) -> Any
X.validate(input, pos)
Supplemental documentation: Qt 5 reference:
[virtual] QValidator::State QAbstractSpinBox::validate(QString \&input, int \&pos) const
This virtual function is called by the QAbstractSpinBox to determine whether input is valid. The pos parameter indicates the position in the string. Reimplemented in the various subclasses.
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/qabstractspinbox.html#validate
wheelEvent
wheelEvent(event: Any) -> None
X.wheelEvent(event)
Supplemental documentation: Qt 5 reference:
[override virtual protected] void QAbstractSpinBox::wheelEvent(QWheelEvent *event)
Reimplements: QWidget::wheelEvent(QWheelEvent *event).
Upstream PySide2 reference signatures (binding differences may apply):
wheelEvent(self, event: PySide2.QtGui.QWheelEvent) -> None
Source: https://doc.qt.io/archives/qt-5.15/qabstractspinbox.html#wheelEvent
windowIconChanged
windowIconChanged(*args: Any, **kwargs: Any) -> Any
Native PythonQt.QtGui.QAbstractSpinBox.windowIconChanged; argument details are not documented.
windowIconTextChanged
windowIconTextChanged(*args: Any, **kwargs: Any) -> Any
Native PythonQt.QtGui.QAbstractSpinBox.windowIconTextChanged; argument details are not documented.
windowTitleChanged
windowTitleChanged(*args: Any, **kwargs: Any) -> Any
Native PythonQt.QtGui.QAbstractSpinBox.windowTitleChanged; argument details are not documented.