Slider

_images/SliderExample.gif
class MangoUI.Slider.Slider(parent=None, slideDirection=PyQt6.QtCore.Qt.Orientation.Horizontal, animationType=PyQt6.QtCore.QEasingCurve.Type.OutCubic, animationDuration=500, wrapAround=False)

Widget that supports slide navigation between stacked widgets.

Parameters
  • parent (QObject, optional) – Parent object that contains this widget. Passing this ensures that destroying the parent also destroys this widget.

  • slideDirection (PyQt6.QtCore.Qt.Orientation) – Sliding animation direction.

  • animationType (PyQt6.QtCore.QEasingCurve.Type) – Sliding animation type.

  • animationDuration (int) – Sliding animation duration in milliseconds.

  • wrapAround (bool) – Wrap around slides. If set to true, the first slide returns after the last slide.

animationDoneSlot()
setAnimationDuration(animationDuration)

Set animation duration.

Parameters

animationDuration (int) – Sliding animation duration in milliseconds.

setAnimationType(animationType)

Set sliding animation type.

Parameters

animationType (PyQt6.QtCore.Qt.QEasingCurve.Type) – Sliding animation type.

setSlideDirection(slideDirection)

Set sliding animation direction.

Parameters

slideDirection (Qt.Orientation.Horizontal) – Sliding animation direction.

setWrapAround(wrapAround)

Set wrap around slides.

Parameters

wrapAround (bool) – Wrap around slides.

slideNext()

Move to next slide.

slidePrevious()

Move to previous slide.

slideToIndex(idx)

Move to slide by index.

Parameters

idx (int) – Slide index.

slideToWidget(widget)

Slide to given widget.

Parameters

widget (PyQt6.QtWidgets.QWidget) – Widget to slide to.