Overlay¶
class Overlay(parent: QWidget)
Bases: QWidget
Dark transparent overlay that highlights widgets during the walkthrough.
- param parent:
Parent widget over which the overlay is displayed.
- type parent:
QWidget
Public Methods¶
- Overlay.eventFilter(watched: QObject, event: QEvent) bool¶
Update overlay geometry if the parent is resized or moved.
- Parameters:
watched (QObject) – The object being watched.
event (QEvent) – The triggered event.
- Returns:
True if the event is handled, False otherwise.
- Return type:
- Overlay.highlight(widgets: QWidget | Sequence[QWidget]) None¶
Set the target widgets to be highlighted by the overlay.
- Parameters:
widgets (Union[QWidget, Sequence[QWidget]]) – A widget or sequence of widgets to highlight.
- Overlay.paintEvent(event: QPaintEvent) None¶
Paint the dimmed background and highlight outlines around target widgets.
- Parameters:
event (QPaintEvent) – The paint event.