Skip to content

ToolTip

Base classes

Name Children Inherits
QToolTip
PySide6.QtWidgets

⋔ Inheritance diagram

graph TD
  1065432947["widgets.ToolTip"]
  3390420149["QtWidgets.QToolTip"]
  37984305["Shiboken.Object"]
  2751680898["builtins.object"]
  3390420149 --> 1065432947
  37984305 --> 3390420149
  2751680898 --> 37984305

🛈 DocStrings

Bases: QToolTip

Tool tips (balloon help) for any widget.

Source code in prettyqt/widgets/tooltip.py
class ToolTip(QtWidgets.QToolTip):
    """Tool tips (balloon help) for any widget."""

    @classmethod
    def show_text(
        cls,
        position: datatypes.PointType | None = None,
        text: str = "",
        linebreak_px: int = 400,
    ):
        cls.showText(
            QtGui.QCursor.pos() if position is None else datatypes.to_point(position),
            f'<div style="max-width: {linebreak_px}px">{text}</div>',
        )

:fa-brands-github: Show source on GitHub