"""
PySide stub files generated by **IceSpringPySideStubs**

Home: https://baijifeilong.github.io/2022/01/06/ice-spring-pyside-stubs/index.html

Github: https://github.com/baijifeilong/IceSpringPySideStubs

PyPI(PySide2): https://pypi.org/project/IceSpringPySideStubs-PySide2

PyPI(PySide6): https://pypi.org/project/IceSpringPySideStubs-PySide6

PyPI(PyQt5): https://pypi.org/project/IceSpringPySideStubs-PyQt5

Generated by BaiJiFeiLong@gmail.com

Licence: GPLv3
"""
"""
This file contains the exact signatures for all functions in module
PySide6.QtWidgets, except for defaults which are replaced by "...".
"""
from typing import Optional, Sequence, Union
import PySide6.QtCore
import PySide6.QtGui
import PySide6.QtWidgets

bytes = str


class QToolTip(object):
    """
    https://doc.qt.io/qt-6/qtooltip.html

    **Detailed Description**

    The tip is a short piece of text reminding the user of the widget's
    function. It is drawn immediately below the given position in a distinctive
    black-on-yellow color combination. The tip can be any **rich text**
    formatted string.

    Rich text displayed in a tool tip is implicitly word-wrapped unless
    specified differently with `<p style='white-space:pre'>`.

    The simplest and most common way to set a widget's tool tip is by calling
    its **QWidget::setToolTip** () function.

    It is also possible to show different tool tips for different regions of a
    widget, by using a **QHelpEvent**  of type **QEvent::ToolTip** . Intercept
    the help event in your widget's **event** () function and call
    **QToolTip::showText** () with the text you want to display. The
    **Tooltips**  example illustrates this technique.

    If you are calling **QToolTip::hideText** (), or **QToolTip::showText** ()
    with an empty string, as a result of a **ToolTip** -event you should also
    call **ignore** () on the event, to signal that you don't want to start any
    tooltip specific modes.

    Note that, if you want to show tooltips in an item view, the model/view
    architecture provides functionality to set an item's tool tip; e.g., the
    **QTableWidgetItem::setToolTip** () function. However, if you want to
    provide custom tool tips in an item view, you must intercept the help event
    in the **QAbstractItemView::viewportEvent** () function and handle it
    yourself.

    The default tool tip color and font can be customized with **setPalette** ()
    and **setFont** (). When a tooltip is currently on display, **isVisible** ()
    returns `true` and **text** () the currently visible text.

    **Note:** Tool tips use the inactive color group of **QPalette** , because
    tool tips are not active windows.

    **See also** **QWidget::toolTip** , **QAction::toolTip** , and **Tool Tips
    Example** .
    """

    @staticmethod
    def font() -> PySide6.QtGui.QFont:
        """
        https://doc.qt.io/qt-6/qtooltip.html#font

        **[static] QFont QToolTip::font()**

        Returns the font used to render tooltips.

        **See also** **setFont** ().
        """
        ...

    @staticmethod
    def hideText() -> None:
        """
        https://doc.qt.io/qt-6/qtooltip.html#hideText

        **[static] void QToolTip::hideText()**

        Hides the tool tip. This is the same as calling **showText** () with an
        empty string.

        **See also** **showText** ().
        """
        ...

    @staticmethod
    def isVisible() -> bool:
        """
        https://doc.qt.io/qt-6/qtooltip.html#isVisible

        **[static] bool QToolTip::isVisible()**

        Returns `true` if a tooltip is currently shown.

        **See also** **showText** ().
        """
        ...

    @staticmethod
    def palette() -> PySide6.QtGui.QPalette:
        """
        https://doc.qt.io/qt-6/qtooltip.html#palette

        **[static] QPalette QToolTip::palette()**

        Returns the palette used to render tooltips.

        **Note:** Tool tips use the inactive color group of **QPalette** ,
        because tool tips are not active windows.

        **See also** **setPalette** ().
        """
        ...

    @staticmethod
    def setFont(arg__1: Union[PySide6.QtGui.QFont, str, Sequence[str]]) -> None:
        """
        https://doc.qt.io/qt-6/qtooltip.html#setFont

        **[static] void QToolTip::setFont(const QFont & font )**

        Sets the **font** used to render tooltips.

        **See also** **font** ().
        """
        ...

    @staticmethod
    def setPalette(
        arg__1: Union[
            PySide6.QtGui.QPalette, PySide6.QtCore.Qt.GlobalColor, PySide6.QtGui.QColor
        ]
    ) -> None:
        """
        https://doc.qt.io/qt-6/qtooltip.html#setPalette

        **[static] void QToolTip::setPalette(const QPalette & palette )**

        Sets the **palette** used to render tooltips.

        **Note:** Tool tips use the inactive color group of **QPalette** ,
        because tool tips are not active windows.

        **See also** **palette** ().
        """
        ...

    @staticmethod
    def showText(
        pos: PySide6.QtCore.QPoint,
        text: str,
        w: Optional[PySide6.QtWidgets.QWidget] = ...,
        rect: PySide6.QtCore.QRect = ...,
        msecShowTime: int = ...,
    ) -> None:
        """
        https://doc.qt.io/qt-6/qtooltip.html#showText

        **[static] void QToolTip::showText(const QPoint & pos , const QString &
        text , QWidget * w = nullptr, const QRect & rect = {}, int
        msecDisplayTime = -1)**

        Shows **text** as a tool tip, with the global position **pos** as the
        point of interest. The tool tip will be shown with a platform specific
        offset from this point of interest.

        If you specify a non-empty rect the tip will be hidden as soon as you
        move your cursor out of this area.

        The **rect** is in the coordinates of the widget you specify with **w**.
        If the **rect** is not empty you must specify a widget. Otherwise this
        argument can be `nullptr` but it is used to determine the appropriate
        screen on multi-head systems.

        The **msecDisplayTime** parameter specifies for how long the tool tip
        will be displayed, in milliseconds. With the default value of -1, the
        time is based on the length of the text.

        If **text** is empty the tool tip is hidden. If the text is the same as
        the currently shown tooltip, the tip will **not** move. You can force
        moving by first hiding the tip with an empty text, and then showing the
        new tip at the new position.
        """
        ...

    @staticmethod
    def text() -> str:
        """
        https://doc.qt.io/qt-6/qtooltip.html#text

        **[static] QString QToolTip::text()**

        Returns the tooltip text, if a tooltip is visible, or an empty string if
        a tooltip is not visible.
        """
        ...
