stacked_widget

Module Contents

OpacityAniStackedWidget

Stacked widget with fade in and fade out animation

PopUpAniInfo

Pop up ani info

PopUpAniStackedWidget

Stacked widget with pop up animation

TransitionStackedWidget

EntranceTransitionStackedWidget

DrillInTransitionStackedWidget

class OpacityAniStackedWidget(parent=None)

Bases: PyQt5.QtWidgets.QStackedWidget

Stacked widget with fade in and fade out animation

addWidget(w: PyQt5.QtWidgets.QWidget)
setCurrentIndex(index: int)
setCurrentWidget(w: PyQt5.QtWidgets.QWidget)
class PopUpAniInfo(widget: PyQt5.QtWidgets.QWidget, deltaX: int, deltaY, ani: PyQt5.QtCore.QPropertyAnimation)

Pop up ani info

widget
deltaX
deltaY
ani
class PopUpAniStackedWidget(parent=None)

Bases: PyQt5.QtWidgets.QStackedWidget

Stacked widget with pop up animation

aniFinished
aniStart
aniInfos: List[PopUpAniInfo] = []
isAnimationEnabled = True
addWidget(widget, deltaX=0, deltaY=76)

add widget to window

Parameters

widget:

widget to be added

deltaX: int

the x-axis offset from the beginning to the end of animation

deltaY: int

the y-axis offset from the beginning to the end of animation

removeWidget(widget: PyQt5.QtWidgets.QWidget)
setAnimationEnabled(isEnabled: bool)

set whether the pop animation is enabled

setCurrentIndex(index: int, needPopOut: bool = False, showNextWidgetDirectly: bool = True, duration: int = 250, easingCurve=QEasingCurve.OutQuad)

set current window to display

Parameters

index: int

the index of widget to display

isNeedPopOut: bool

need pop up animation or not

showNextWidgetDirectly: bool

whether to show next widget directly when animation started

duration: int

animation duration

easingCurve: QEasingCurve

the interpolation mode of animation

setCurrentWidget(widget, needPopOut: bool = False, showNextWidgetDirectly: bool = True, duration: int = 250, easingCurve=QEasingCurve.OutQuad)

set currect widget

Parameters

widget:

the widget to be displayed

isNeedPopOut: bool

need pop up animation or not

showNextWidgetDirectly: bool

whether to show next widget directly when animation started

duration: int

animation duration

easingCurve: QEasingCurve

the interpolation mode of animation

class TransitionStackedWidget(parent=None)

Bases: PyQt5.QtWidgets.QStackedWidget

aniFinished
aniStart
setAnimationEnabled(isEnabled: bool)

set whether the transition animation is enabled

isAnimationEnabled() bool

return whether the transition animation is enabled

addWidget(w)
insertWidget(index, w)
setCurrentWidget(widget: PyQt5.QtWidgets.QWidget, duration: int = None, isBack: bool = False)

set current page widget with transition animation

Parameters

widget: QWidget

target widget to display

duration: int

animation duration in milliseconds, None for default

isBack: bool

whether this is a back navigation

setCurrentIndex(index: int, duration: int = None, isBack: bool = False)

set current page index with transition animation

Parameters

index: int

page index

duration: int

animation duration in milliseconds, None for default

isBack: bool

whether this is a back navigation

class EntranceTransitionStackedWidget(parent=None)

Bases: TransitionStackedWidget

class DrillInTransitionStackedWidget(parent=None)

Bases: TransitionStackedWidget