Button

class Button[source]

Bases: Component

This component creates a button widget that can be customized with text, icon, tooltip, and action.

Parameters:
textstr, optional

The text to display on the button.

icon_pathUnion[str, pathlib.Path], optional

The path to the icon file to display on the button.

tooltipstr, optional

The tooltip text to show when hovering over the button.

actionCallable[[], None], optional

A function to call when the button is clicked.

Attributes:
widgetQPushButton

The push button widget.

actionCallable[[], None] or None

The callback function to call when the button is clicked.

Inherited Methods

update