scroll_bar ========== .. py:module:: qfluentwidgets.components.widgets.scroll_bar Module Contents --------------- .. autoapisummary:: qfluentwidgets.components.widgets.scroll_bar.ArrowButton qfluentwidgets.components.widgets.scroll_bar.ScrollBarGroove qfluentwidgets.components.widgets.scroll_bar.ScrollBarHandle qfluentwidgets.components.widgets.scroll_bar.ScrollBarHandleDisplayMode qfluentwidgets.components.widgets.scroll_bar.ScrollBar qfluentwidgets.components.widgets.scroll_bar.SmoothScrollBar qfluentwidgets.components.widgets.scroll_bar.SmoothScrollDelegate .. py:class:: ArrowButton(icon: qfluentwidgets.common.icon.FluentIcon, parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QToolButton` Arrow button .. py:attribute:: lightColor .. py:attribute:: darkColor .. py:attribute:: opacity :value: 1 .. py:method:: setOpacity(opacity) .. py:method:: setLightColor(color) .. py:method:: setDarkColor(color) .. py:method:: paintEvent(e) .. py:class:: ScrollBarGroove(orient: PyQt5.QtCore.Qt.Orientation, parent) Bases: :py:obj:`PyQt5.QtWidgets.QWidget` Scroll bar groove .. py:attribute:: lightBackgroundColor .. py:attribute:: darkBackgroundColor .. py:attribute:: opacityAni .. py:method:: setLightBackgroundColor(color) .. py:method:: setDarkBackgroundColor(color) .. py:method:: fadeIn() .. py:method:: fadeOut() .. py:method:: paintEvent(e) .. py:method:: setOpacity(opacity: float) .. py:method:: getOpacity() -> float .. py:attribute:: opacity .. py:class:: ScrollBarHandle(orient: PyQt5.QtCore.Qt.Orientation, parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QWidget` Scroll bar handle .. py:attribute:: opacityAni .. py:attribute:: lightColor .. py:attribute:: darkColor .. py:attribute:: orient .. py:method:: setLightColor(color) .. py:method:: setDarkColor(color) .. py:method:: paintEvent(e) .. py:method:: fadeIn() .. py:method:: fadeOut() .. py:method:: setOpacity(opacity: float) .. py:method:: getOpacity() -> float .. py:attribute:: opacity .. py:class:: ScrollBarHandleDisplayMode Bases: :py:obj:`enum.Enum` Scroll bar handle display mode .. py:attribute:: ALWAYS :value: 0 .. py:attribute:: ON_HOVER :value: 1 .. py:class:: ScrollBar(orient: PyQt5.QtCore.Qt.Orientation, parent: PyQt5.QtWidgets.QAbstractScrollArea) Bases: :py:obj:`PyQt5.QtWidgets.QWidget` Fluent scroll bar .. py:attribute:: rangeChanged .. py:attribute:: valueChanged .. py:attribute:: sliderPressed .. py:attribute:: sliderReleased .. py:attribute:: sliderMoved .. py:attribute:: groove .. py:attribute:: handle .. py:attribute:: handleDisplayMode .. py:method:: value() .. py:method:: val() .. py:method:: minimum() .. py:method:: maximum() .. py:method:: orientation() .. py:method:: pageStep() .. py:method:: singleStep() .. py:method:: isSliderDown() .. py:method:: setValue(value: int) .. py:method:: setMinimum(min: int) .. py:method:: setMaximum(max: int) .. py:method:: setRange(min: int, max: int) .. py:method:: setPageStep(step: int) .. py:method:: setSingleStep(step: int) .. py:method:: setSliderDown(isDown: bool) .. py:method:: setHandleColor(light, dark) set the color of handle Parameters ---------- light, dark: QColor | str | Qt.GlobalColor the color in light/dark theme mode .. py:method:: setArrowColor(light, dark) set the color of arrow button Parameters ---------- light, dark: QColor | str | Qt.GlobalColor the color in light/dark theme mode .. py:method:: setGrooveColor(light, dark) set the color of groove Parameters ---------- light, dark: QColor | str | Qt.GlobalColor the color in light/dark theme mode .. py:method:: setHandleDisplayMode(mode: ScrollBarHandleDisplayMode) set the display mode of handle .. py:method:: expand() expand scroll bar .. py:method:: collapse() collapse scroll bar .. py:method:: enterEvent(e) .. py:method:: leaveEvent(e) .. py:method:: eventFilter(obj, e: PyQt5.QtCore.QEvent) .. py:method:: resizeEvent(e) .. py:method:: mousePressEvent(e: PyQt5.QtGui.QMouseEvent) .. py:method:: mouseReleaseEvent(e) .. py:method:: mouseMoveEvent(e: PyQt5.QtGui.QMouseEvent) .. py:method:: setForceHidden(isHidden: bool) whether to force the scrollbar to be hidden .. py:method:: wheelEvent(e) .. py:class:: SmoothScrollBar(orient: PyQt5.QtCore.Qt.Orientation, parent) Bases: :py:obj:`ScrollBar` Smooth scroll bar .. py:attribute:: duration :value: 500 .. py:attribute:: ani .. py:method:: setValue(value, useAni=True) .. py:method:: scrollValue(value, useAni=True) scroll the specified distance .. py:method:: scrollTo(value, useAni=True) scroll to the specified position .. py:method:: resetValue(value) .. py:method:: mousePressEvent(e) .. py:method:: mouseMoveEvent(e) .. py:method:: setScrollAnimation(duration, easing=QEasingCurve.OutCubic) set scroll animation Parameters ---------- duration: int scroll duration easing: QEasingCurve animation type .. py:class:: SmoothScrollDelegate(parent: PyQt5.QtWidgets.QAbstractScrollArea, useAni=False) Bases: :py:obj:`PyQt5.QtCore.QObject` Smooth scroll delegate .. py:attribute:: useAni :value: False .. py:attribute:: vScrollBar .. py:attribute:: hScrollBar .. py:attribute:: verticalSmoothScroll .. py:attribute:: horizonSmoothScroll .. py:method:: eventFilter(obj, e: PyQt5.QtCore.QEvent) .. py:method:: setVerticalScrollBarPolicy(policy) .. py:method:: setHorizontalScrollBarPolicy(policy)