teaching_tip ============ .. py:module:: qfluentwidgets.components.widgets.teaching_tip Module Contents --------------- .. autoapisummary:: qfluentwidgets.components.widgets.teaching_tip.TeachingTipTailPosition qfluentwidgets.components.widgets.teaching_tip.ImagePosition qfluentwidgets.components.widgets.teaching_tip.TeachingTipView qfluentwidgets.components.widgets.teaching_tip.TeachTipBubble qfluentwidgets.components.widgets.teaching_tip.TeachingTip qfluentwidgets.components.widgets.teaching_tip.PopupTeachingTip qfluentwidgets.components.widgets.teaching_tip.TeachingTipManager qfluentwidgets.components.widgets.teaching_tip.TopTailTeachingTipManager qfluentwidgets.components.widgets.teaching_tip.BottomTailTeachingTipManager qfluentwidgets.components.widgets.teaching_tip.LeftTailTeachingTipManager qfluentwidgets.components.widgets.teaching_tip.RightTailTeachingTipManager qfluentwidgets.components.widgets.teaching_tip.TopLeftTailTeachingTipManager qfluentwidgets.components.widgets.teaching_tip.TopRightTailTeachingTipManager qfluentwidgets.components.widgets.teaching_tip.BottomLeftTailTeachingTipManager qfluentwidgets.components.widgets.teaching_tip.BottomRightTailTeachingTipManager qfluentwidgets.components.widgets.teaching_tip.LeftTopTailTeachingTipManager qfluentwidgets.components.widgets.teaching_tip.LeftBottomTailTeachingTipManager qfluentwidgets.components.widgets.teaching_tip.RightTopTailTeachingTipManager qfluentwidgets.components.widgets.teaching_tip.RightBottomTailTeachingTipManager .. py:class:: TeachingTipTailPosition Bases: :py:obj:`enum.Enum` Teaching tip tail position .. py:attribute:: TOP :value: 0 .. py:attribute:: BOTTOM :value: 1 .. py:attribute:: LEFT :value: 2 .. py:attribute:: RIGHT :value: 3 .. py:attribute:: TOP_LEFT :value: 4 .. py:attribute:: TOP_RIGHT :value: 5 .. py:attribute:: BOTTOM_LEFT :value: 6 .. py:attribute:: BOTTOM_RIGHT :value: 7 .. py:attribute:: LEFT_TOP :value: 8 .. py:attribute:: LEFT_BOTTOM :value: 9 .. py:attribute:: RIGHT_TOP :value: 10 .. py:attribute:: RIGHT_BOTTOM :value: 11 .. py:attribute:: NONE :value: 12 .. py:class:: ImagePosition Bases: :py:obj:`enum.Enum` Generic enumeration. Derive from this class to define new enumerations. .. py:attribute:: TOP :value: 0 .. py:attribute:: BOTTOM :value: 1 .. py:attribute:: LEFT :value: 2 .. py:attribute:: RIGHT :value: 3 .. py:class:: TeachingTipView(title: str, content: str, icon: Union[qfluentwidgets.common.icon.FluentIconBase, PyQt5.QtGui.QIcon, str] = None, image: Union[str, PyQt5.QtGui.QPixmap, PyQt5.QtGui.QImage] = None, isClosable=True, tailPosition=TeachingTipTailPosition.BOTTOM, parent=None) Bases: :py:obj:`qfluentwidgets.components.widgets.flyout.FlyoutView` Teaching tip view .. py:attribute:: manager .. py:attribute:: hBoxLayout .. py:method:: paintEvent(e) .. py:class:: TeachTipBubble(view: qfluentwidgets.components.widgets.flyout.FlyoutViewBase, tailPosition=TeachingTipTailPosition.BOTTOM, parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QWidget` Teaching tip bubble .. py:attribute:: manager .. py:attribute:: hBoxLayout .. py:attribute:: view .. py:method:: setView(view: PyQt5.QtWidgets.QWidget) .. py:method:: paintEvent(e) .. py:class:: TeachingTip(view: qfluentwidgets.components.widgets.flyout.FlyoutViewBase, target: PyQt5.QtWidgets.QWidget, duration=1000, tailPosition=TeachingTipTailPosition.BOTTOM, parent=None, isDeleteOnClose=True) Bases: :py:obj:`PyQt5.QtWidgets.QWidget` Teaching tip .. py:attribute:: target .. py:attribute:: duration :value: 1000 .. py:attribute:: isDeleteOnClose :value: True .. py:attribute:: manager .. py:attribute:: hBoxLayout .. py:attribute:: opacityAni .. py:attribute:: bubble .. py:method:: setShadowEffect(blurRadius=35, offset=(0, 8)) add shadow to dialog .. py:method:: showEvent(e) .. py:method:: closeEvent(e) .. py:method:: eventFilter(obj, e: PyQt5.QtCore.QEvent) .. py:method:: addWidget(widget: PyQt5.QtWidgets.QWidget, stretch=0, align=Qt.AlignLeft) add widget to teaching tip .. py:property:: view .. py:method:: setView(view) .. py:method:: make(view: qfluentwidgets.components.widgets.flyout.FlyoutViewBase, target: PyQt5.QtWidgets.QWidget, duration=1000, tailPosition=TeachingTipTailPosition.BOTTOM, parent=None, isDeleteOnClose=True) :classmethod: Parameters ---------- view: FlyoutViewBase teaching tip view target: QWidget the target widget to show tip duration: int the time for teaching tip to display in milliseconds. If duration is less than zero, teaching tip will never disappear. tailPosition: TeachingTipTailPosition the position of bubble tail parent: QWidget parent widget isDeleteOnClose: bool whether delete flyout automatically when flyout is closed .. py:method:: create(target: PyQt5.QtWidgets.QWidget, title: str, content: str, icon: Union[qfluentwidgets.common.icon.FluentIconBase, PyQt5.QtGui.QIcon, str] = None, image: Union[str, PyQt5.QtGui.QPixmap, PyQt5.QtGui.QImage] = None, isClosable=True, duration=1000, tailPosition=TeachingTipTailPosition.BOTTOM, parent=None, isDeleteOnClose=True) :classmethod: Parameters ---------- target: QWidget the target widget to show tip title: str the title of teaching tip content: str the content of teaching tip icon: InfoBarIcon | FluentIconBase | QIcon | str the icon of teaching tip image: str | QPixmap | QImage the image of teaching tip isClosable: bool whether to show the close button duraction: int the time for teaching tip to display in milliseconds. If duration is less than zero, teaching tip will never disappear. parent: QWidget parent widget isDeleteOnClose: bool whether delete flyout automatically when flyout is closed .. py:class:: PopupTeachingTip(view: qfluentwidgets.components.widgets.flyout.FlyoutViewBase, target: PyQt5.QtWidgets.QWidget, duration=1000, tailPosition=TeachingTipTailPosition.BOTTOM, parent=None, isDeleteOnClose=True) Bases: :py:obj:`TeachingTip` Pop up teaching tip .. py:class:: TeachingTipManager Bases: :py:obj:`PyQt5.QtCore.QObject` Teaching tip manager .. py:method:: doLayout(tip: TeachTipBubble) manage the layout of tip .. py:method:: imagePosition() .. py:method:: position(tip: TeachingTip) -> PyQt5.QtCore.QPoint .. py:method:: draw(tip: TeachTipBubble, painter: PyQt5.QtGui.QPainter) draw the shape of bubble .. py:method:: make(position: TeachingTipTailPosition) :staticmethod: mask teaching tip manager according to the display position .. py:class:: TopTailTeachingTipManager Bases: :py:obj:`TeachingTipManager` Top tail teaching tip manager .. py:method:: doLayout(tip) manage the layout of tip .. py:method:: imagePosition() .. py:method:: draw(tip, painter) draw the shape of bubble .. py:class:: BottomTailTeachingTipManager Bases: :py:obj:`TeachingTipManager` Bottom tail teaching tip manager .. py:method:: doLayout(tip) manage the layout of tip .. py:method:: draw(tip, painter) draw the shape of bubble .. py:class:: LeftTailTeachingTipManager Bases: :py:obj:`TeachingTipManager` Left tail teaching tip manager .. py:method:: doLayout(tip) manage the layout of tip .. py:method:: imagePosition() .. py:method:: draw(tip, painter) draw the shape of bubble .. py:class:: RightTailTeachingTipManager Bases: :py:obj:`TeachingTipManager` Left tail teaching tip manager .. py:method:: doLayout(tip) manage the layout of tip .. py:method:: imagePosition() .. py:method:: draw(tip, painter) draw the shape of bubble .. py:class:: TopLeftTailTeachingTipManager Bases: :py:obj:`TopTailTeachingTipManager` Top left tail teaching tip manager .. py:method:: draw(tip, painter) draw the shape of bubble .. py:class:: TopRightTailTeachingTipManager Bases: :py:obj:`TopTailTeachingTipManager` Top right tail teaching tip manager .. py:method:: draw(tip, painter) draw the shape of bubble .. py:class:: BottomLeftTailTeachingTipManager Bases: :py:obj:`BottomTailTeachingTipManager` Bottom left tail teaching tip manager .. py:method:: draw(tip, painter) draw the shape of bubble .. py:class:: BottomRightTailTeachingTipManager Bases: :py:obj:`BottomTailTeachingTipManager` Bottom right tail teaching tip manager .. py:method:: draw(tip, painter) draw the shape of bubble .. py:class:: LeftTopTailTeachingTipManager Bases: :py:obj:`LeftTailTeachingTipManager` Left top tail teaching tip manager .. py:method:: imagePosition() .. py:method:: draw(tip, painter) draw the shape of bubble .. py:class:: LeftBottomTailTeachingTipManager Bases: :py:obj:`LeftTailTeachingTipManager` Left bottom tail teaching tip manager .. py:method:: imagePosition() .. py:method:: draw(tip, painter) draw the shape of bubble .. py:class:: RightTopTailTeachingTipManager Bases: :py:obj:`RightTailTeachingTipManager` Right top tail teaching tip manager .. py:method:: imagePosition() .. py:method:: draw(tip, painter) draw the shape of bubble .. py:class:: RightBottomTailTeachingTipManager Bases: :py:obj:`RightTailTeachingTipManager` Right bottom tail teaching tip manager .. py:method:: imagePosition() .. py:method:: draw(tip, painter) draw the shape of bubble