smooth_scroll

Module Contents

SmoothScroll

平滑滚动

SmoothMode

平滑滚动模式

class SmoothScroll(widget: PyQt5.QtWidgets.QScrollArea, orient=Qt.Vertical)

平滑滚动

widget
orient
fps = 60
duration = 400
stepsTotal = 0
stepRatio = 1.5
acceleration = 1
lastWheelEvent = None
scrollStamps
stepsLeftQueue
smoothMoveTimer
smoothMode
setSmoothMode(smoothMode)

设置平滑滚动模式

wheelEvent(e)
class SmoothMode

Bases: enum.Enum

平滑滚动模式

NO_SMOOTH = 0
CONSTANT = 1
LINEAR = 2
QUADRATI = 3
COSINE = 4