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 .. 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: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:: 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