scroll_bar

Module Contents

ArrowButton

Arrow button

ScrollBarGroove

Scroll bar groove

ScrollBarHandle

Scroll bar handle

ScrollBarHandleDisplayMode

Scroll bar handle display mode

ScrollBar

Fluent scroll bar

SmoothScrollBar

Smooth scroll bar

SmoothScrollDelegate

Smooth scroll delegate

class ArrowButton(icon: qfluentwidgets.common.icon.FluentIcon, parent=None)

Bases: PyQt5.QtWidgets.QToolButton

Arrow button

lightColor
darkColor
opacity = 1
setOpacity(opacity)
setLightColor(color)
setDarkColor(color)
paintEvent(e)
class ScrollBarGroove(orient: PyQt5.QtCore.Qt.Orientation, parent)

Bases: PyQt5.QtWidgets.QWidget

Scroll bar groove

lightBackgroundColor
darkBackgroundColor
opacityAni
setLightBackgroundColor(color)
setDarkBackgroundColor(color)
fadeIn()
fadeOut()
paintEvent(e)
setOpacity(opacity: float)
getOpacity() float
opacity
class ScrollBarHandle(orient: PyQt5.QtCore.Qt.Orientation, parent=None)

Bases: PyQt5.QtWidgets.QWidget

Scroll bar handle

opacityAni
lightColor
darkColor
orient
setLightColor(color)
setDarkColor(color)
paintEvent(e)
fadeIn()
fadeOut()
setOpacity(opacity: float)
getOpacity() float
opacity
class ScrollBarHandleDisplayMode

Bases: enum.Enum

Scroll bar handle display mode

ALWAYS = 0
ON_HOVER = 1
class ScrollBar(orient: PyQt5.QtCore.Qt.Orientation, parent: PyQt5.QtWidgets.QAbstractScrollArea)

Bases: PyQt5.QtWidgets.QWidget

Fluent scroll bar

rangeChanged
valueChanged
sliderPressed
sliderReleased
sliderMoved
groove
handle
handleDisplayMode
value()
val()
minimum()
maximum()
orientation()
pageStep()
singleStep()
isSliderDown()
setValue(value: int)
setMinimum(min: int)
setMaximum(max: int)
setRange(min: int, max: int)
setPageStep(step: int)
setSingleStep(step: int)
setSliderDown(isDown: bool)
setHandleColor(light, dark)

set the color of handle

Parameters

light, dark: QColor | str | Qt.GlobalColor

the color in light/dark theme mode

setArrowColor(light, dark)

set the color of arrow button

Parameters

light, dark: QColor | str | Qt.GlobalColor

the color in light/dark theme mode

setGrooveColor(light, dark)

set the color of groove

Parameters

light, dark: QColor | str | Qt.GlobalColor

the color in light/dark theme mode

setHandleDisplayMode(mode: ScrollBarHandleDisplayMode)

set the display mode of handle

expand()

expand scroll bar

collapse()

collapse scroll bar

enterEvent(e)
leaveEvent(e)
eventFilter(obj, e: PyQt5.QtCore.QEvent)
resizeEvent(e)
mousePressEvent(e: PyQt5.QtGui.QMouseEvent)
mouseReleaseEvent(e)
mouseMoveEvent(e: PyQt5.QtGui.QMouseEvent)
setForceHidden(isHidden: bool)

whether to force the scrollbar to be hidden

wheelEvent(e)
class SmoothScrollBar(orient: PyQt5.QtCore.Qt.Orientation, parent)

Bases: ScrollBar

Smooth scroll bar

duration = 500
ani
setValue(value, useAni=True)
scrollValue(value, useAni=True)

scroll the specified distance

scrollTo(value, useAni=True)

scroll to the specified position

resetValue(value)
mousePressEvent(e)
mouseMoveEvent(e)
setScrollAnimation(duration, easing=QEasingCurve.OutCubic)

set scroll animation

Parameters

duration: int

scroll duration

easing: QEasingCurve

animation type

class SmoothScrollDelegate(parent: PyQt5.QtWidgets.QAbstractScrollArea, useAni=False)

Bases: PyQt5.QtCore.QObject

Smooth scroll delegate

useAni = False
vScrollBar
hScrollBar
verticalSmoothScroll
horizonSmoothScroll
eventFilter(obj, e: PyQt5.QtCore.QEvent)
setVerticalScrollBarPolicy(policy)
setHorizontalScrollBarPolicy(policy)