stacked_widget ============== .. py:module:: qfluentwidgets.components.widgets.stacked_widget Module Contents --------------- .. autoapisummary:: qfluentwidgets.components.widgets.stacked_widget.OpacityAniStackedWidget qfluentwidgets.components.widgets.stacked_widget.PopUpAniInfo qfluentwidgets.components.widgets.stacked_widget.PopUpAniStackedWidget qfluentwidgets.components.widgets.stacked_widget.TransitionStackedWidget qfluentwidgets.components.widgets.stacked_widget.EntranceTransitionStackedWidget qfluentwidgets.components.widgets.stacked_widget.DrillInTransitionStackedWidget .. py:class:: OpacityAniStackedWidget(parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QStackedWidget` Stacked widget with fade in and fade out animation .. py:method:: addWidget(w: PyQt5.QtWidgets.QWidget) .. py:method:: setCurrentIndex(index: int) .. py:method:: setCurrentWidget(w: PyQt5.QtWidgets.QWidget) .. py:class:: PopUpAniInfo(widget: PyQt5.QtWidgets.QWidget, deltaX: int, deltaY, ani: PyQt5.QtCore.QPropertyAnimation) Pop up ani info .. py:attribute:: widget .. py:attribute:: deltaX .. py:attribute:: deltaY .. py:attribute:: ani .. py:class:: PopUpAniStackedWidget(parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QStackedWidget` Stacked widget with pop up animation .. py:attribute:: aniFinished .. py:attribute:: aniStart .. py:attribute:: aniInfos :type: List[PopUpAniInfo] :value: [] .. py:attribute:: isAnimationEnabled :value: True .. py:method:: 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 .. py:method:: removeWidget(widget: PyQt5.QtWidgets.QWidget) .. py:method:: setAnimationEnabled(isEnabled: bool) set whether the pop animation is enabled .. py:method:: 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 .. py:method:: 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 .. py:class:: TransitionStackedWidget(parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QStackedWidget` .. py:attribute:: aniFinished .. py:attribute:: aniStart .. py:method:: setAnimationEnabled(isEnabled: bool) set whether the transition animation is enabled .. py:method:: isAnimationEnabled() -> bool return whether the transition animation is enabled .. py:method:: addWidget(w) .. py:method:: insertWidget(index, w) .. py:method:: 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 .. py:method:: 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 .. py:class:: EntranceTransitionStackedWidget(parent=None) Bases: :py:obj:`TransitionStackedWidget` .. py:class:: DrillInTransitionStackedWidget(parent=None) Bases: :py:obj:`TransitionStackedWidget`