teaching_tip#

Module Contents#

TeachingTipTailPosition

Teaching tip tail position

ImagePosition

Generic enumeration.

TeachingTipView

Teaching tip view

TeachTipBubble

Teaching tip bubble

TeachingTip

Teaching tip

PopupTeachingTip

Pop up teaching tip

TeachingTipManager

Teaching tip manager

TopTailTeachingTipManager

Top tail teaching tip manager

BottomTailTeachingTipManager

Bottom tail teaching tip manager

LeftTailTeachingTipManager

Left tail teaching tip manager

RightTailTeachingTipManager

Left tail teaching tip manager

TopLeftTailTeachingTipManager

Top left tail teaching tip manager

TopRightTailTeachingTipManager

Top right tail teaching tip manager

BottomLeftTailTeachingTipManager

Bottom left tail teaching tip manager

BottomRightTailTeachingTipManager

Bottom right tail teaching tip manager

LeftTopTailTeachingTipManager

Left top tail teaching tip manager

LeftBottomTailTeachingTipManager

Left bottom tail teaching tip manager

RightTopTailTeachingTipManager

Right top tail teaching tip manager

RightBottomTailTeachingTipManager

Right bottom tail teaching tip manager

class TeachingTipTailPosition#

Bases: enum.Enum

Teaching tip tail position

TOP = 0#
BOTTOM = 1#
LEFT = 2#
RIGHT = 3#
TOP_LEFT = 4#
TOP_RIGHT = 5#
BOTTOM_LEFT = 6#
BOTTOM_RIGHT = 7#
LEFT_TOP = 8#
LEFT_BOTTOM = 9#
RIGHT_TOP = 10#
RIGHT_BOTTOM = 11#
NONE = 12#
class ImagePosition#

Bases: enum.Enum

Generic enumeration.

Derive from this class to define new enumerations.

TOP = 0#
BOTTOM = 1#
LEFT = 2#
RIGHT = 3#
class TeachingTipView(title: str, content: str, icon: qfluentwidgets.common.icon.FluentIconBase | PyQt5.QtGui.QIcon | str = None, image: str | PyQt5.QtGui.QPixmap | PyQt5.QtGui.QImage = None, isClosable=True, tailPosition=TeachingTipTailPosition.BOTTOM, parent=None)#

Bases: qfluentwidgets.components.widgets.flyout.FlyoutView

Teaching tip view

paintEvent(e)#
class TeachTipBubble(view: qfluentwidgets.components.widgets.flyout.FlyoutViewBase, tailPosition=TeachingTipTailPosition.BOTTOM, parent=None)#

Bases: PyQt5.QtWidgets.QWidget

Teaching tip bubble

setView(view: PyQt5.QtWidgets.QWidget)#
paintEvent(e)#
class TeachingTip(view: qfluentwidgets.components.widgets.flyout.FlyoutViewBase, target: PyQt5.QtWidgets.QWidget, duration=1000, tailPosition=TeachingTipTailPosition.BOTTOM, parent=None, isDeleteOnClose=True)#

Bases: PyQt5.QtWidgets.QWidget

Teaching tip

property view#
setShadowEffect(blurRadius=35, offset=(0, 8))#

add shadow to dialog

showEvent(e)#
closeEvent(e)#
eventFilter(obj, e: PyQt5.QtCore.QEvent)#
addWidget(widget: PyQt5.QtWidgets.QWidget, stretch=0, align=Qt.AlignLeft)#

add widget to teaching tip

setView(view)#
classmethod make(view: qfluentwidgets.components.widgets.flyout.FlyoutViewBase, target: PyQt5.QtWidgets.QWidget, duration=1000, tailPosition=TeachingTipTailPosition.BOTTOM, parent=None, isDeleteOnClose=True)#

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

classmethod create(target: PyQt5.QtWidgets.QWidget, title: str, content: str, icon: qfluentwidgets.common.icon.FluentIconBase | PyQt5.QtGui.QIcon | str = None, image: str | PyQt5.QtGui.QPixmap | PyQt5.QtGui.QImage = None, isClosable=True, duration=1000, tailPosition=TeachingTipTailPosition.BOTTOM, parent=None, isDeleteOnClose=True)#

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

class PopupTeachingTip(view: qfluentwidgets.components.widgets.flyout.FlyoutViewBase, target: PyQt5.QtWidgets.QWidget, duration=1000, tailPosition=TeachingTipTailPosition.BOTTOM, parent=None, isDeleteOnClose=True)#

Bases: TeachingTip

Pop up teaching tip

class TeachingTipManager#

Bases: PyQt5.QtCore.QObject

Teaching tip manager

doLayout(tip: TeachTipBubble)#

manage the layout of tip

imagePosition()#
position(tip: TeachingTip) PyQt5.QtCore.QPoint#
draw(tip: TeachTipBubble, painter: PyQt5.QtGui.QPainter)#

draw the shape of bubble

static make(position: TeachingTipTailPosition)#

mask teaching tip manager according to the display position

class TopTailTeachingTipManager#

Bases: TeachingTipManager

Top tail teaching tip manager

doLayout(tip)#

manage the layout of tip

imagePosition()#
draw(tip, painter)#

draw the shape of bubble

class BottomTailTeachingTipManager#

Bases: TeachingTipManager

Bottom tail teaching tip manager

doLayout(tip)#

manage the layout of tip

draw(tip, painter)#

draw the shape of bubble

class LeftTailTeachingTipManager#

Bases: TeachingTipManager

Left tail teaching tip manager

doLayout(tip)#

manage the layout of tip

imagePosition()#
draw(tip, painter)#

draw the shape of bubble

class RightTailTeachingTipManager#

Bases: TeachingTipManager

Left tail teaching tip manager

doLayout(tip)#

manage the layout of tip

imagePosition()#
draw(tip, painter)#

draw the shape of bubble

class TopLeftTailTeachingTipManager#

Bases: TopTailTeachingTipManager

Top left tail teaching tip manager

draw(tip, painter)#

draw the shape of bubble

class TopRightTailTeachingTipManager#

Bases: TopTailTeachingTipManager

Top right tail teaching tip manager

draw(tip, painter)#

draw the shape of bubble

class BottomLeftTailTeachingTipManager#

Bases: BottomTailTeachingTipManager

Bottom left tail teaching tip manager

draw(tip, painter)#

draw the shape of bubble

class BottomRightTailTeachingTipManager#

Bases: BottomTailTeachingTipManager

Bottom right tail teaching tip manager

draw(tip, painter)#

draw the shape of bubble

class LeftTopTailTeachingTipManager#

Bases: LeftTailTeachingTipManager

Left top tail teaching tip manager

imagePosition()#
draw(tip, painter)#

draw the shape of bubble

class LeftBottomTailTeachingTipManager#

Bases: LeftTailTeachingTipManager

Left bottom tail teaching tip manager

imagePosition()#
draw(tip, painter)#

draw the shape of bubble

class RightTopTailTeachingTipManager#

Bases: RightTailTeachingTipManager

Right top tail teaching tip manager

imagePosition()#
draw(tip, painter)#

draw the shape of bubble

class RightBottomTailTeachingTipManager#

Bases: RightTailTeachingTipManager

Right bottom tail teaching tip manager

imagePosition()#
draw(tip, painter)#

draw the shape of bubble