Loading Spinner¶
Widgets for displaying loading states and progress indicators.
Preview
Classes¶
FXLoadingSpinner
¶
Bases: ,
A themeable animated loading indicator.
This widget provides a modern spinning/pulsing loading indicator with customizable colors and animation styles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
|
Parent widget. |
None
|
|
|
Size of the spinner in pixels. |
32
|
|
|
Width of the spinner lines. |
3
|
|
|
Spinner color. If None, uses theme accent. |
None
|
|
|
Animation style ('spinner', 'dots', 'pulse'). |
'spinner'
|
Examples:
>>> spinner = FXLoadingSpinner(size=32)
>>> spinner.start()
>>> # ... do some work ...
>>> spinner.stop()
Methods:
| Name | Description |
|---|---|
|
Set the rotation angle. |
|
Return whether the spinner is currently animating. |
|
Paint the loading spinner. |
|
Set the spinner color. |
|
Set the animation style. |
|
Start the loading animation. |
|
Stop the loading animation. |
FXLoadingOverlay
¶
Bases: ,
A loading overlay that blocks the parent widget.
This widget creates a semi-transparent overlay with a loading spinner, useful for indicating that a long operation is in progress.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
|
Parent widget to overlay. |
None
|
|
|
Optional message to display below the spinner. |
None
|
Examples:
>>> overlay = FXLoadingOverlay(my_widget, "Loading assets...")
>>> overlay.show()
>>> # ... do some work ...
>>> overlay.hide()
Methods:
| Name | Description |
|---|---|
|
Hide the overlay and stop the spinner. |
|
Paint the semi-transparent background. |
|
Handle parent resize. |
|
Show the overlay and start the spinner. |