loading_spinner
_loading_spinner
¶
Animated loading indicator widget.
Classes:
| Name | Description |
|---|---|
FXLoadingOverlay |
A loading overlay that blocks the parent widget. |
FXLoadingSpinner |
A themeable animated loading indicator. |
Classes¶
FXLoadingOverlay
¶
Bases: FXThemeAware, QWidget
flowchart TD
fxgui.fxwidgets._loading_spinner.FXLoadingOverlay[FXLoadingOverlay]
fxgui.fxstyle.FXThemeAware[FXThemeAware]
fxgui.fxstyle.FXThemeAware --> fxgui.fxwidgets._loading_spinner.FXLoadingOverlay
click fxgui.fxwidgets._loading_spinner.FXLoadingOverlay href "" "fxgui.fxwidgets._loading_spinner.FXLoadingOverlay"
click fxgui.fxstyle.FXThemeAware href "" "fxgui.fxstyle.FXThemeAware"
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 |
|---|---|---|---|
|
Optional[QWidget]
|
Parent widget to overlay. |
None
|
|
Optional[str]
|
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 |
Hide the overlay and stop the spinner. |
paintEvent |
Paint the semi-transparent background. |
resizeEvent |
Handle parent resize. |
show |
Show the overlay and start the spinner. |
FXLoadingSpinner
¶
FXLoadingSpinner(
parent: Optional[QWidget] = None,
size: int = 32,
line_width: int = 3,
color: Optional[str] = None,
style: str = "spinner",
)
Bases: FXThemeAware, QWidget
flowchart TD
fxgui.fxwidgets._loading_spinner.FXLoadingSpinner[FXLoadingSpinner]
fxgui.fxstyle.FXThemeAware[FXThemeAware]
fxgui.fxstyle.FXThemeAware --> fxgui.fxwidgets._loading_spinner.FXLoadingSpinner
click fxgui.fxwidgets._loading_spinner.FXLoadingSpinner href "" "fxgui.fxwidgets._loading_spinner.FXLoadingSpinner"
click fxgui.fxstyle.FXThemeAware href "" "fxgui.fxstyle.FXThemeAware"
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 |
|---|---|---|---|
|
Optional[QWidget]
|
Parent widget. |
None
|
|
int
|
Size of the spinner in pixels. |
32
|
|
int
|
Width of the spinner lines. |
3
|
|
Optional[str]
|
Spinner color. If None, uses theme accent. |
None
|
|
str
|
Animation style ('spinner', 'dots', 'pulse'). |
'spinner'
|
Examples:
>>> spinner = FXLoadingSpinner(size=32)
>>> spinner.start()
>>> # ... do some work ...
>>> spinner.stop()
Methods:
| Name | Description |
|---|---|
angle |
Set the rotation angle. |
is_spinning |
Return whether the spinner is currently animating. |
paintEvent |
Paint the loading spinner. |
set_color |
Set the spinner color. |
set_style |
Set the animation style. |
start |
Start the loading animation. |
stop |
Stop the loading animation. |