Subgroup: other
Class: QgsDoubleSpinBox¶
-
class
qgis.gui.
QgsDoubleSpinBox
¶ Bases:
PyQt5.QtWidgets.QDoubleSpinBox
The QgsSpinBox is a spin box with a clear button that will set the value to the defined clear value. The clear value can be either the minimum or the maiximum value of the spin box or a custom value. This value can then be handled by a special value text.
Methods
acceptDrops
accessibleDescription
accessibleName
actionEvent
actions
activateWindow
addAction
addActions
adjustSize
alignment
autoFillBackground
backgroundRole
baseSize
blockSignals
buttonSymbols
changeEvent
childAt
childAt(self, int, int) -> QWidget childEvent
children
childrenRect
childrenRegion
cleanText
clear
Set the current value to the value defined by the clear value. clearFocus
clearMask
clearValue
Returns the value used when clear() is called. close
closeEvent
colorCount
connectNotify
contentsMargins
contentsRect
contextMenuEvent
contextMenuPolicy
correctionMode
create
createWindowContainer
cursor
customEvent
decimals
deleteLater
depth
destroy
devType
devicePixelRatio
devicePixelRatioF
devicePixelRatioFScale
disconnect
disconnectNotify
dragEnterEvent
dragLeaveEvent
dragMoveEvent
dropEvent
dumpObjectInfo
dumpObjectTree
dynamicPropertyNames
effectiveWinId
ensurePolished
enterEvent
event
eventFilter
expressionsEnabled
Returns whether the widget will allow entry of simple expressions, which are evaluated and then discarded. find
findChild
findChild(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> QObject findChildren
findChildren(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] fixup
focusInEvent
focusNextChild
focusNextPrevChild
focusOutEvent
focusPolicy
focusPreviousChild
focusProxy
focusWidget
font
fontInfo
fontMetrics
foregroundRole
frameGeometry
frameSize
geometry
getContentsMargins
grab
grabGesture
grabKeyboard
grabMouse
grabMouse(self, Union[QCursor, Qt.CursorShape]) grabShortcut
graphicsEffect
graphicsProxyWidget
hasAcceptableInput
hasFocus
hasFrame
hasHeightForWidth
hasMouseTracking
hasTabletTracking
height
heightForWidth
heightMM
hide
hideEvent
inherits
initPainter
initStyleOption
inputMethodEvent
inputMethodHints
inputMethodQuery
insertAction
insertActions
installEventFilter
interpretText
isAccelerated
isActiveWindow
isAncestorOf
isEnabled
isEnabledTo
isFullScreen
isGroupSeparatorShown
isHidden
isLeftToRight
isMaximized
isMinimized
isModal
isReadOnly
isRightToLeft
isSignalConnected
isVisible
isVisibleTo
isWidgetType
isWindow
isWindowModified
isWindowType
keyPressEvent
keyReleaseEvent
keyboardGrabber
keyboardTracking
killTimer
layout
layoutDirection
leaveEvent
lineEdit
locale
logicalDpiX
logicalDpiY
lower
mapFrom
mapFromGlobal
mapFromParent
mapTo
mapToGlobal
mapToParent
mask
maximum
maximumHeight
maximumSize
maximumWidth
metaObject
metric
minimum
minimumHeight
minimumSize
minimumSizeHint
minimumWidth
mouseDoubleClickEvent
mouseGrabber
mouseMoveEvent
mousePressEvent
mouseReleaseEvent
move
move(self, int, int) moveEvent
moveToThread
nativeEvent
nativeParentWidget
nextInFocusChain
normalGeometry
objectName
overrideWindowFlags
overrideWindowState
paintEngine
paintEvent
paintingActive
palette
parent
parentWidget
physicalDpiX
physicalDpiY
pos
prefix
previousInFocusChain
property
pyqtConfigure
Each keyword argument is either the name of a Qt property or a Qt signal. raise_
receivers
rect
releaseKeyboard
releaseMouse
releaseShortcut
removeAction
removeEventFilter
render
render(self, QPainter, targetOffset: QPoint = QPoint(), sourceRegion: QRegion = QRegion(), flags: Union[QWidget.RenderFlags, QWidget.RenderFlag] = QWidget.RenderFlags(QWidget.DrawWindowBackground|QWidget.DrawChildren)) repaint
repaint(self, int, int, int, int) resize
resize(self, int, int) resizeEvent
restoreGeometry
saveGeometry
scroll
scroll(self, int, int, QRect) selectAll
sender
senderSignalIndex
setAccelerated
setAcceptDrops
setAccessibleDescription
setAccessibleName
setAlignment
setAttribute
setAutoFillBackground
setBackgroundRole
setBaseSize
setBaseSize(self, QSize) setButtonSymbols
setClearValue
Defines the clear value as a custom value and will automatically set the clear value mode to CustomValue. setClearValueMode
Defines if the clear value should be the minimum or maximum values of the widget or a custom value. setContentsMargins
setContentsMargins(self, QMargins) setContextMenuPolicy
setCorrectionMode
setCursor
setDecimals
setDisabled
setEnabled
setExpressionsEnabled
Sets if the widget will allow entry of simple expressions, which are evaluated and then discarded. setFixedHeight
setFixedSize
setFixedSize(self, int, int) setFixedWidth
setFocus
setFocus(self, Qt.FocusReason) setFocusPolicy
setFocusProxy
setFont
setForegroundRole
setFrame
setGeometry
setGeometry(self, int, int, int, int) setGraphicsEffect
setGroupSeparatorShown
setHidden
setInputMethodHints
setKeyboardTracking
setLayout
setLayoutDirection
setLineEdit
setLocale
setMask
setMask(self, QRegion) setMaximum
setMaximumHeight
setMaximumSize
setMaximumSize(self, QSize) setMaximumWidth
setMinimum
setMinimumHeight
setMinimumSize
setMinimumSize(self, QSize) setMinimumWidth
setMouseTracking
setObjectName
setPalette
setParent
setParent(self, QWidget, Union[Qt.WindowFlags, Qt.WindowType]) setPrefix
setProperty
setRange
setReadOnly
setShortcutAutoRepeat
setShortcutEnabled
setShowClearButton
Sets whether the widget will show a clear button. setSingleStep
setSizeIncrement
setSizeIncrement(self, QSize) setSizePolicy
setSizePolicy(self, QSizePolicy.Policy, QSizePolicy.Policy) setSpecialValueText
setStatusTip
setStyle
setStyleSheet
setSuffix
setTabOrder
setTabletTracking
setToolTip
setToolTipDuration
setUpdatesEnabled
setValue
setVisible
setWhatsThis
setWindowFilePath
setWindowFlag
setWindowFlags
setWindowIcon
setWindowIconText
setWindowModality
setWindowModified
setWindowOpacity
setWindowRole
setWindowState
setWindowTitle
setWrapping
sharedPainter
show
showClearButton
Returns whether the widget is showing a clear button. showEvent
showFullScreen
showMaximized
showMinimized
showNormal
signalsBlocked
singleStep
size
sizeHint
sizeIncrement
sizePolicy
specialValueText
stackUnder
startTimer
statusTip
stepBy
stepDown
stepEnabled
stepUp
style
styleSheet
suffix
tabletEvent
testAttribute
text
textFromValue
thread
timerEvent
toolTip
toolTipDuration
tr
underMouse
ungrabGesture
unsetCursor
unsetLayoutDirection
unsetLocale
update
update(self, QRect) updateGeometry
updateMicroFocus
updatesEnabled
validate
value
valueFromText
visibleRegion
whatsThis
wheelEvent
width
widthMM
winId
window
windowFilePath
windowFlags
windowHandle
windowIcon
windowIconText
windowModality
windowOpacity
windowRole
windowState
windowTitle
windowType
wrapping
x
y
Attributes
CorrectToNearestValue
CorrectToPreviousValue
CustomValue
DrawChildren
DrawWindowBackground
IgnoreMask
MaximumValue
MinimumValue
NoButtons
PdmDepth
PdmDevicePixelRatio
PdmDevicePixelRatioScaled
PdmDpiX
PdmDpiY
PdmHeight
PdmHeightMM
PdmNumColors
PdmPhysicalDpiX
PdmPhysicalDpiY
PdmWidth
PdmWidthMM
PlusMinus
StepDownEnabled
StepNone
StepUpEnabled
UpDownArrows
customContextMenuRequested
customContextMenuRequested(self, QPoint) [signal] destroyed
destroyed(self, QObject = None) [signal] editingFinished
editingFinished(self) [signal] objectNameChanged
objectNameChanged(self, str) [signal] staticMetaObject
valueChanged
valueChanged(self, float) [signal] windowIconChanged
windowIconChanged(self, QIcon) [signal] windowIconTextChanged
windowIconTextChanged(self, str) [signal] windowTitleChanged
windowTitleChanged(self, str) [signal] -
class
ClearValueMode
¶ Bases:
int
-
CustomValue
= 2¶
-
MaximumValue
= 1¶
-
MinimumValue
= 0¶
-
actionEvent
()¶
-
changeEvent
(self, event: QEvent)¶
-
childEvent
()¶
-
clear
(self)¶ Set the current value to the value defined by the clear value.
-
clearValue
(self) → float¶ Returns the value used when clear() is called.
See also
-
closeEvent
()¶
-
connectNotify
()¶
-
contextMenuEvent
()¶
-
create
()¶
-
customEvent
()¶
-
destroy
()¶
-
disconnectNotify
()¶
-
dragEnterEvent
()¶
-
dragLeaveEvent
()¶
-
dragMoveEvent
()¶
-
dropEvent
()¶
-
enterEvent
()¶
-
expressionsEnabled
(self) → bool¶ Returns whether the widget will allow entry of simple expressions, which are evaluated and then discarded.
Returns: true if spin box allows expression entry New in version 2.7.
-
focusInEvent
()¶
-
focusNextChild
()¶
-
focusNextPrevChild
()¶
-
focusOutEvent
()¶
-
focusPreviousChild
()¶
-
hideEvent
()¶
-
initPainter
()¶
-
initStyleOption
()¶
-
inputMethodEvent
()¶
-
isSignalConnected
()¶
-
keyPressEvent
()¶
-
keyReleaseEvent
()¶
-
leaveEvent
()¶
-
lineEdit
()¶
-
metric
()¶
-
mouseDoubleClickEvent
()¶
-
mouseMoveEvent
()¶
-
mousePressEvent
()¶
-
mouseReleaseEvent
()¶
-
moveEvent
()¶
-
nativeEvent
()¶
-
paintEvent
(self, e: QPaintEvent)¶
-
receivers
()¶
-
resizeEvent
()¶
-
sender
()¶
-
senderSignalIndex
()¶
-
setClearValue
(self, customValue: float, clearValueText: str = '')¶ Defines the clear value as a custom value and will automatically set the clear value mode to CustomValue.
Parameters: - customValue – defines the numerical value used as the clear value
- clearValueText – is the text displayed when the spin box is at the clear value. If not specified, no special value text is used.
See also
-
setClearValueMode
(self, mode: QgsDoubleSpinBox.ClearValueMode, clearValueText: str = '')¶ Defines if the clear value should be the minimum or maximum values of the widget or a custom value.
Parameters: - mode – mode to user for clear value
- clearValueText – is the text displayed when the spin box is at the clear value. If not specified, no special value text is used.
-
setExpressionsEnabled
(self, enabled: bool)¶ Sets if the widget will allow entry of simple expressions, which are evaluated and then discarded.
Parameters: enabled – set to true to allow expression entry New in version 2.7.
-
setLineEdit
()¶
-
setShowClearButton
(self, showClearButton: bool)¶ Sets whether the widget will show a clear button. The clear button allows users to reset the widget to a default or empty state.
Parameters: showClearButton – set to true to show the clear button, or false to hide it See also
-
showClearButton
(self) → bool¶ Returns whether the widget is showing a clear button.
See also
-
showEvent
()¶
-
stepEnabled
()¶
-
tabletEvent
()¶
-
timerEvent
()¶
-
updateMicroFocus
()¶
-
validate
(self, input: str) → Tuple[QValidator.State, int]¶
-
valueFromText
(self, text: str) → float¶
-
wheelEvent
(self, event: QWheelEvent)¶
-
class