Particles
ParticleBackdrop
Flowing ribbons, floating dots and a starfield with pointer ripples, theme-aware colors, and controls for motion and density.
Example
Property preview could not load. Select Property preview to retry.

Usage
Flowing ribbons
A quiet animated surface follows the current theme and motion preference.
#include <FluentQt/Particles.h>
using namespace fluent::particles;
auto* backdrop = new ParticleBackdrop(this);
backdrop->setEffect(ParticleBackdrop::FlowingRibbons);
backdrop->setBackgroundMode(ParticleBackdrop::Solid);
backdrop->setParticleCount(240);
backdrop->setMaximumFrameRate(30);
backdrop->setMinimumHeight(240);
backdrop->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);import fluentqt
from PySide6.QtWidgets import QSizePolicy
from fluentqt.particles import ParticleBackdrop
backdrop = ParticleBackdrop()
backdrop.setEffect(ParticleBackdrop.Effect.FlowingRibbons)
backdrop.setBackgroundMode(ParticleBackdrop.BackgroundMode.Solid)
backdrop.setParticleCount(240)
backdrop.setMaximumFrameRate(30)
backdrop.setMinimumHeight(240)
backdrop.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Preferred)API
DeclarationNo matching API members.
fluent::particles::ParticleBackdrop
Inherits QWidget · FluentElement · QMLPlus
Animated particle backdrop widget rendered on the CPU by default. Supports normal child layouts on top and pauses automatically when hidden or when reduced motion is enabled.
Constructors
Properties
Effect effect- Read
effect()WritesetEffect()NotifyeffectChanged() bool animationEnabled- Read
isAnimationEnabled()WritesetAnimationEnabled()NotifyanimationEnabledChanged() bool animatingWhether the particle animation is currently running.
ReadisAnimating()NotifyanimatingChanged()bool gpuAccelerationEnabledAllows switching to GPU rendering when used with Spatial (default false; standalone widgets always use CPU).
ReadisGpuAccelerationEnabled()WritesetGpuAccelerationEnabled()NotifygpuAccelerationEnabledChanged()qreal speed- Read
speed()WritesetSpeed()NotifyspeedChanged() int particleCount- Read
particleCount()WritesetParticleCount()NotifyparticleCountChanged() int maximumFrameRate- Read
maximumFrameRate()WritesetMaximumFrameRate()NotifymaximumFrameRateChanged() bool interactive- Read
isInteractive()WritesetInteractive()NotifyinteractiveChanged() bool pauseWhenInactive- Read
isPauseWhenInactive()WritesetPauseWhenInactive()NotifypauseWhenInactiveChanged() BackgroundMode backgroundMode- Read
backgroundMode()WritesetBackgroundMode()NotifybackgroundModeChanged() QMarginsF fadeMargins- Read
fadeMargins()WritesetFadeMargins()NotifyfadeMarginsChanged()
Methods
void setEffect(Effect effect)Switches the particle preset and resets simulation phase without resuming paused motion.
bool isAnimating() constWhether the particle animation is currently running.
bool isGpuAccelerationEnabled() constAllows switching to GPU rendering when used with Spatial (default false; standalone widgets always use CPU).
void setGpuAccelerationEnabled(bool enabled)Allows switching to GPU rendering when used with Spatial (default false; standalone widgets always use CPU).
void setSpeed(qreal speed)Sets simulation speed multiplier in [0, 4]; 0 pauses motion.
void setParticleCount(int count)Sets particle count in [0, 960] (excluding FlowingRibbons ribbons and sparks).
void setMaximumFrameRate(int framesPerSecond)Sets maximum animation frame rate in [1, 60] fps.
void setPauseWhenInactive(bool pause)Whether to pause animation when the application becomes inactive.
void setFadeMargins(const QMarginsF& margins)Sets non-negative edge fade widths in logical pixels.
void triggerRipple(const QPointF& position)Emits a decorative ripple at local coordinates when motion is allowed (up to 3 active).
Signals
void animatingChanged(bool animating)Whether the particle animation is currently running.
void gpuAccelerationEnabledChanged(bool enabled)Allows switching to GPU rendering when used with Spatial (default false; standalone widgets always use CPU).
Enumerations
enum EffectBuilt-in particle presets.
FlowingRibbonsOrbiting ribbons and sparks.FloatingDotsSoft lights drifting upward.StarfieldStars moving toward the viewer.
enum BackgroundModeBackground fill mode.
TransparentSolid
Destructors
Protected members
Methods
Inherited from fluent::FluentElement
Methods
static void setTheme(Theme theme)Updates the global theme and notifies active FluentElement instances.
static void setThemeDeferred(Theme theme)Schedules a visible-first batched theme refresh without blocking the current interaction.
static Theme currentTheme()Returns the currently active global theme.
static bool themeUsesDarkAppearance(Theme theme)Returns whether a theme uses dark-backed chrome and material tokens.
static void refreshTheme()Re-broadcasts the current theme to repaint after a design-token change.
static int themeGeneration()Monotonic counter bumped on every theme change, for staleness checks.
Theme effectiveTheme() constResolves the theme used by this element, honoring an inherited QWidget override.
bool effectiveThemeUsesDarkAppearance() constReturns whether this element's effective theme uses dark-backed chrome.
bool setThemeOverrides(const QJsonObject& overrides)Replaces this element's sparse color, radius, and font token overrides.
QJsonObject themeOverrides() constReturns this element's authored overrides.
void clearThemeOverrides()Restores all token fields to global theme defaults.
const Colors& themeColorsRef() constNon-copying access to the active color set for hot paint paths.
Material::AcrylicToken themeAcrylic() constMaterial, elevation, and adaptive layout tokens.
QColor themeBackdrop(bool active) constWindow-chrome backdrop color for the given activation state.
virtual void onThemeUpdated()Called after the global theme changes.
Enumerations
enum ThemeGlobal visual theme used when resolving design tokens.
Light = 0Dark = 1HighContrast = 2
Types and aliases
struct ColorsDesign token snapshots returned to components.
Inherited from fluent::QMLPlus
Methods
AnchorLayout::Anchors* anchors()Returns mutable anchors for the QWidget host.
void setState(const QString& name)Applies a registered state by name, or restores the default state when @p name is empty. Unknown names are ignored, and existing bindings resume when leaving the state.
void addState(const QMLState& state)Registers or replaces a named state definition; replacing the active state applies it immediately.
void evaluateStates()Reevaluates state conditions in registration order and activates the first match, or the default state if none match. Also runs automatically when dependency properties notify; derived states using extend inherit ancestor changes unless cyclic or missing.
QMLPlusRuntime* runtime()Returns the lazily created state observer owned by this host.
void setAnchors(const AnchorLayout::Anchors& anchors)Replaces all host anchors and invalidates the parent layout.
void resetAnchors()Clears all host anchors and invalidates the parent layout.
void bind(const char* targetProp, QObject* source, const char* sourceProp, PropertyBinder::Direction dir = PropertyBinder::OneWay)Binds @p sourceProp on @p source to @p targetProp on this QWidget host via PropertyBinder::bind().
BindingHandle bindManaged(const char* targetProp, QObject* source, const char* sourceProp, PropertyBinder::Direction direction = PropertyBinder::OneWay, BindingOptions options = {})Installs a managed direct binding on this QWidget host.
BindingHandle bindComputed(const char* targetProp, const QVector<BindingDependency>& dependencies, std::function<QVariant()> evaluate, BindingOptions options = {})Installs an explicit-dependency C++ expression on this QWidget host.
void addTransition(const StateTransition& transition)Registers a state transition in precedence order.
void setBehavior(const char* propertyName, const PropertyAnimation& animation)Sets the default animation used when @p propertyName is written via writeProperty() or a binding. Explicit StateTransition rules take precedence; direct C++ setter calls are not animated.
void clearBehavior(const char* propertyName)Removes the default animation for future managed writes.
bool writeProperty(const char* propertyName, const QVariant& value)Writes a host property through Behavior without removing its binding.
Qt base class docs: QWidget