Class: QgsRangeSlider

class qgis.gui.QgsRangeSlider

Bases: PyQt5.QtWidgets.QWidget

A slider control with two interactive endpoints, for interactive selection of a range of values.

New in version 3.18.

QgsRangeSlider(parent: QWidget = None) Constructor for QgsRangeSlider, with the specified parent widget.

QgsRangeSlider(orientation: Qt.Orientation, parent: QWidget = None) Constructor for QgsRangeSlider, with the specified parent widget.

The orientation parameter determines whether the slider is horizontal or vertical.

Methods

actionEvent

changeEvent

childEvent

closeEvent

connectNotify

contextMenuEvent

create

customEvent

destroy

disconnectNotify

dragEnterEvent

dragLeaveEvent

dragMoveEvent

dropEvent

enterEvent

event

param event

flippedDirection

Returns True if the slider has its values flipped.

focusInEvent

focusNextChild

focusNextPrevChild

focusOutEvent

focusPreviousChild

hideEvent

initPainter

inputMethodEvent

isSignalConnected

keyPressEvent

param event

keyReleaseEvent

leaveEvent

lowerValue

Returns the lower value for the range selected in the widget.

maximum

Returns the maximum value allowed by the widget.

metric

minimum

Returns the minimum value allowed by the widget.

minimumSizeHint

rtype

QSize

mouseDoubleClickEvent

mouseMoveEvent

param event

mousePressEvent

param event

mouseReleaseEvent

param event

moveEvent

nativeEvent

orientation

Returns the orientation of the slider.

pageStep

Returns the page step value for the widget.

paintEvent

param event

receivers

resizeEvent

sender

senderSignalIndex

setFlippedDirection

Sets whether the slider has its values flipped.

setLowerValue

Sets the lower value for the range currently selected in the widget.

setMaximum

Sets the maximum value allowed in the widget.

setMinimum

Sets the minimum value allowed in the widget.

setOrientation

Sets the orientation of the slider.

setPageStep

Sets the page step value for the widget.

setRange

Sets the current range selected in the widget.

setRangeLimits

Sets the minimum and maximum range limits for values allowed in the widget.

setSingleStep

Sets the single step value for the widget.

setTickInterval

Sets the interval for tick marks shown in the widget.

setTickPosition

Sets the position of the tick marks shown in the widget.

setUpperValue

Sets the upper value for the range currently selected in the widget.

sharedPainter

showEvent

singleStep

Returns the single step value for the widget.

sizeHint

rtype

QSize

tabletEvent

tickInterval

Returns the interval for tick marks shown in the widget.

tickPosition

Returns the position of the tick marks shown in the widget.

timerEvent

updateMicroFocus

upperValue

Returns the upper value for the range selected in the widget.

wheelEvent

Signals

rangeChanged

Emitted when the range selected in the widget is changed.

rangeLimitsChanged

Emitted when the limits of values allowed in the widget is changed.

actionEvent(self, QActionEvent)
changeEvent(self, QEvent)
childEvent(self, QChildEvent)
closeEvent(self, QCloseEvent)
connectNotify(self, QMetaMethod)
contextMenuEvent(self, QContextMenuEvent)
create(self, window: sip.voidptr = 0, initializeWindow: bool = True, destroyOldWindow: bool = True)
customEvent(self, QEvent)
destroy(self, destroyWindow: bool = True, destroySubWindows: bool = True)
disconnectNotify(self, QMetaMethod)
dragEnterEvent(self, QDragEnterEvent)
dragLeaveEvent(self, QDragLeaveEvent)
dragMoveEvent(self, QDragMoveEvent)
dropEvent(self, QDropEvent)
enterEvent(self, QEvent)
event(self, event: QEvent) bool
Parameters

event (QEvent) –

Return type

bool

flippedDirection(self) bool

Returns True if the slider has its values flipped.

If this property is False (the default), the minimum and maximum will be shown in its classic position for the widget. If the value is True, the minimum and maximum appear at their opposite location.

Return type

bool

focusInEvent(self, QFocusEvent)
focusNextChild(self) bool
focusNextPrevChild(self, bool) bool
focusOutEvent(self, QFocusEvent)
focusPreviousChild(self) bool
hideEvent(self, QHideEvent)
initPainter(self, QPainter)
inputMethodEvent(self, QInputMethodEvent)
isSignalConnected(self, QMetaMethod) bool
keyPressEvent(self, event: QKeyEvent)
Parameters

event (QKeyEvent) –

keyReleaseEvent(self, QKeyEvent)
leaveEvent(self, QEvent)
lowerValue(self) int

Returns the lower value for the range selected in the widget.

See also

upperValue()

See also

setLowerValue()

Return type

int

maximum(self) int

Returns the maximum value allowed by the widget.

See also

setMaximum()

See also

minimum()

Return type

int

metric(self, QPaintDevice.PaintDeviceMetric) int
minimum(self) int

Returns the minimum value allowed by the widget.

See also

setMinimum()

See also

maximum()

Return type

int

minimumSizeHint(self) QSize
Return type

QSize

mouseDoubleClickEvent(self, QMouseEvent)
mouseMoveEvent(self, event: QMouseEvent)
Parameters

event (QMouseEvent) –

mousePressEvent(self, event: QMouseEvent)
Parameters

event (QMouseEvent) –

mouseReleaseEvent(self, event: QMouseEvent)
Parameters

event (QMouseEvent) –

moveEvent(self, QMoveEvent)
nativeEvent(self, Union[QByteArray, bytes, bytearray], sip.voidptr) Tuple[bool, int]
orientation(self) Qt.Orientation

Returns the orientation of the slider.

See also

setOrientation()

Return type

Qt.Orientation

pageStep(self) int

Returns the page step value for the widget.

This corresponds to the larger increment or decrement applied when the user presses the page increment key (usually PageUp or PageDown).

See also

setPageStep()

See also

singleStep()

Return type

int

paintEvent(self, event: QPaintEvent)
Parameters

event (QPaintEvent) –

rangeChanged

Emitted when the range selected in the widget is changed. [signal]

Parameters
  • minimum (int) –

  • maximum (int) –

rangeLimitsChanged

Emitted when the limits of values allowed in the widget is changed. [signal]

Parameters
  • minimum (int) –

  • maximum (int) –

receivers(self, PYQT_SIGNAL) int
resizeEvent(self, QResizeEvent)
sender(self) QObject
senderSignalIndex(self) int
setFlippedDirection(self, flipped: bool)

Sets whether the slider has its values flipped.

If this property is False (the default), the minimum and maximum will be shown in its classic position for the widget. If the value is True, the minimum and maximum appear at their opposite location. (i.e. minimum at the bottom of a vertical slider, maximum at the top of a vertical slider).

Parameters

flipped (bool) –

setLowerValue(self, value: int)

Sets the lower value for the range currently selected in the widget.

See also

lowerValue()

See also

setRange()

See also

setUpperValue()

Parameters

value (int) –

setMaximum(self, maximum: int)

Sets the maximum value allowed in the widget.

See also

maximum()

See also

setMinimum()

Parameters

maximum (int) –

setMinimum(self, minimum: int)

Sets the minimum value allowed in the widget.

See also

minimum()

See also

setMaximum()

Parameters

minimum (int) –

setOrientation(self, orientation: Qt.Orientation)

Sets the orientation of the slider.

See also

orientation()

Parameters

orientation (Qt.Orientation) –

setPageStep(self, step: int)

Sets the page step value for the widget.

This corresponds to the larger increment or decrement applied when the user presses the page increment key (usually PageUp or PageDown).

See also

pageStep()

See also

setSingleStep()

Parameters

step (int) –

setRange(self, lower: int, upper: int)

Sets the current range selected in the widget.

See also

setLowerValue()

See also

setUpperValue()

Parameters
  • lower (int) –

  • upper (int) –

setRangeLimits(self, minimum: int, maximum: int)

Sets the minimum and maximum range limits for values allowed in the widget.

See also

setMinimum()

See also

setMaximum()

Parameters
  • minimum (int) –

  • maximum (int) –

setSingleStep(self, step: int)

Sets the single step value for the widget.

This corresponds to the smaller increment or decrement applied when the user presses an arrow key.

See also

singleStep()

See also

pageStep()

Parameters

step (int) –

setTickInterval(self, interval: int)

Sets the interval for tick marks shown in the widget.

See also

tickInterval()

Parameters

interval (int) –

setTickPosition(self, position: QSlider.TickPosition)

Sets the position of the tick marks shown in the widget.

See also

tickPosition()

Parameters

position (QSlider.TickPosition) –

setUpperValue(self, value: int)

Sets the upper value for the range currently selected in the widget.

See also

upperValue()

See also

setRange()

See also

setLowerValue()

Parameters

value (int) –

sharedPainter(self) QPainter
showEvent(self, QShowEvent)
singleStep(self) int

Returns the single step value for the widget.

This corresponds to the smaller increment or decrement applied when the user presses an arrow key.

See also

setSingleStep()

See also

pageStep()

Return type

int

sizeHint(self) QSize
Return type

QSize

tabletEvent(self, QTabletEvent)
tickInterval(self) int

Returns the interval for tick marks shown in the widget.

Return type

int

tickPosition(self) QSlider.TickPosition

Returns the position of the tick marks shown in the widget.

Return type

QSlider.TickPosition

timerEvent(self, QTimerEvent)
updateMicroFocus(self)
upperValue(self) int

Returns the upper value for the range selected in the widget.

See also

lowerValue()

See also

setUpperValue()

Return type

int

wheelEvent(self, QWheelEvent)