"""
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

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

Generated by BaiJiFeiLong@gmail.com

License: MIT
"""
import enum
import typing
import PyQt6.sip
from PyQt6.QtGui import *
import enum


class QTextItem(PyQt6.sip.simplewrapper):
    """
    https://doc.qt.io/qt-6/qtextitem.html

    **Detailed Description**

    When you reimplement your own paint engine, you must reimplement
    **QPaintEngine::drawTextItem** (), a function that takes a QTextItem as one
    of its arguments.
    """

    class RenderFlag(enum.Flag):
        RightToLeft: QTextItem = ...
        Overline: QTextItem = ...
        Underline: QTextItem = ...
        StrikeOut: QTextItem = ...

    @typing.overload
    def __init__(self) -> None:
        ...

    @typing.overload
    def __init__(self, a0: "QTextItem") -> None:
        ...

    def font(self) -> QFont:
        """
        https://doc.qt.io/qt-6/qtextitem.html#font

        **QFont QTextItem::font() const**

        Returns the font that should be used to draw the text.
        """
        ...

    def text(self) -> str:
        """
        https://doc.qt.io/qt-6/qtextitem.html#text

        **QString QTextItem::text() const**

        Returns the text that should be drawn.
        """
        ...

    def renderFlags(self) -> "QTextItem.RenderFlag":
        """
        https://doc.qt.io/qt-6/qtextitem.html#renderFlags

        **QTextItem::RenderFlags QTextItem::renderFlags() const**

        Returns the render flags used.
        """
        ...

    def width(self) -> float:
        """
        https://doc.qt.io/qt-6/qtextitem.html#width

        **qreal QTextItem::width() const**

        Specifies the total width of the text to be drawn.
        """
        ...

    def ascent(self) -> float:
        """
        https://doc.qt.io/qt-6/qtextitem.html#ascent

        **qreal QTextItem::ascent() const**

        Corresponds to the **ascent**  of the piece of text that is drawn.
        """
        ...

    def descent(self) -> float:
        """
        https://doc.qt.io/qt-6/qtextitem.html#descent

        **qreal QTextItem::descent() const**

        Corresponds to the **descent**  of the piece of text that is drawn.
        """
        ...
