spacr.qt.widgets.hover_tooltip
HoverTooltip — a QFrame-based popup that stays visible when the mouse enters it. Unlike QToolTip, users can move their cursor into the popup to click links inside.
- Usage:
tip = HoverTooltip.instance() tip.show_for(some_widget, “some html”) # on hover-enter tip.start_hide() # on hover-leave
The popup cancels its own hide timer if the mouse enters it, and only actually hides when neither the anchor nor the popup itself is under the cursor.
Module Contents
- class spacr.qt.widgets.hover_tooltip.HoverTooltip[source]
Bases:
PySide6.QtWidgets.QFrameSticky QFrame popup that survives cursor entry so users can click links.
Access via
instance()— the popup is a process-wide singleton.- classmethod instance() HoverTooltip[source]
Return the process-wide singleton, creating it on first access.
- show_for(anchor: PySide6.QtWidgets.QWidget, html: str) None[source]
Show the tooltip beneath
anchorwith bodyhtml.- Parameters:
anchor – widget the popup docks to (clamped to its screen).
html – rich-text body; empty strings are ignored.