def showToolTip( text,
                     point      = None,
                     anchor     = None,
                     parent     = None,
                     background = None,
                     foreground = None,
                     key        = None,
                     seconds    = 5 ):
        """
        Displays a popup widget as a tooltip bubble.
        
        :param      text        | <str>
                    point       | <QPoint> || None
                    anchor      | <XPopupWidget.Mode.Anchor> || None
                    parent      | <QWidget> || None
                    background  | <QColor> || None
                    foreground  | <QColor> || None
                    key         | <str> || None
                    seconds     | <int>
        """
        if point is None:
            point = QCursor.pos()
            
        if parent is None:
            parent = QApplication.activeWindow()
        
        if anchor is None and parent is None:
            anchor = XPopupWidget.Anchor.TopCenter
        
        # create a new tooltip widget
        widget = XPopupWidget(parent)
        widget.setToolTipMode()
        widget.setResizable(False)
        
        # create the tooltip label
        label = QLabel(text, widget)
        label.setOpenExternalLinks(True)
        label.setAlignment(Qt.AlignLeft | Qt.AlignVCenter)
        label.setMargin(3)
        label.setIndent(3)
        label.adjustSize()
    
        widget.setCentralWidget(label)
        
        # update the tip
        label.adjustSize()
        widget.adjustSize()
        
        palette = widget.palette()
        if not background:
            background = palette.color(palette.ToolTipBase)
        if not foreground:
            foreground = palette.color(palette.ToolTipText)
        
        palette.setColor(palette.Window,     QColor(background))
        palette.setColor(palette.WindowText, QColor(foreground))
        widget.setPalette(palette)
        widget.centralWidget().setPalette(palette)
        
        if anchor is None:
            widget.setAutoCalculateAnchor(True)
        else:
            widget.setAnchor(anchor)
        
        widget.setAutoCloseOnFocusOut(True)
        widget.setAttribute(Qt.WA_DeleteOnClose)
        widget.popup(point)
        widget.startTimer(1000 * seconds)
        
        return widget
def showToolTip ( text , point = None , anchor = None , parent = None , background = None , foreground = None , key = None , seconds = 5 ) : if point is None : point = QCursor . pos ( ) if parent is None : parent = QApplication . activeWindow ( ) if anchor is None and parent is None : anchor = XPopupWidget . Anchor . TopCenter widget = XPopupWidget ( parent ) widget . setToolTipMode ( ) widget . setResizable ( False ) label = QLabel ( text , widget ) label . setOpenExternalLinks ( True ) label . setAlignment ( Qt . AlignLeft | Qt . AlignVCenter ) label . setMargin ( 3 ) label . setIndent ( 3 ) label . adjustSize ( ) widget . setCentralWidget ( label ) label . adjustSize ( ) widget . adjustSize ( ) palette = widget . palette ( ) if not background : background = palette . color ( palette . ToolTipBase ) if not foreground : foreground = palette . color ( palette . ToolTipText ) palette . setColor ( palette . Window , QColor ( background ) ) palette . setColor ( palette . WindowText , QColor ( foreground ) ) widget . setPalette ( palette ) widget . centralWidget ( ) . setPalette ( palette ) if anchor is None : widget . setAutoCalculateAnchor ( True ) else : widget . setAnchor ( anchor ) widget . setAutoCloseOnFocusOut ( True ) widget . setAttribute ( Qt . WA_DeleteOnClose ) widget . popup ( point ) widget . startTimer ( 1000 * seconds ) return widget
Displays a popup widget as a tooltip bubble.
        
        :param      text        | <str>
                    point       | <QPoint> || None
                    anchor      | <XPopupWidget.Mode.Anchor> || None
                    parent      | <QWidget> || None
                    background  | <QColor> || None
                    foreground  | <QColor> || None
                    key         | <str> || None
                    seconds     | <int>