Particles
ParticleBackdrop
Flowing ribbons, floating dots and a starfield with pointer ripples, theme-aware colors, and controls for motion and density.
Example

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
CPU-default particle presets behind caller-composed content.
Constructors
Properties
Effect effect- Read
effect()WritesetEffect()NotifyeffectChanged() bool animationEnabled- Read
isAnimationEnabled()WritesetAnimationEnabled()NotifyanimationEnabledChanged() bool animatingEffective timer state after policy and visibility.
ReadisAnimating()NotifyanimatingChanged()bool gpuAccelerationEnabledPermit an optional Spatial compositor to accelerate painting; false by default.
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 effect, preserving settings and restarting its phase; invalid values are ignored.
bool isAnimating() constEffective timer state after policy and visibility.
bool isGpuAccelerationEnabled() constPermit an optional Spatial compositor to accelerate painting; false by default.
void setGpuAccelerationEnabled(bool enabled)Permit an optional Spatial compositor to accelerate painting; false by default.
void setSpeed(qreal speed)Sets speed in [0, 4]; zero freezes motion.
void setParticleCount(int count)Sets the particle count in [0, 960]; ribbon accents are independent.
void setMaximumFrameRate(int framesPerSecond)Caps scheduled frames to [1, 60] per second.
void setPauseWhenInactive(bool pause)Controls pausing on application deactivation.
void setFadeMargins(const QMarginsF& margins)Sets nonnegative edge fade widths in logical pixels.
void triggerRipple(const QPointF& position)Emits a decorative ripple in local coordinates when motion is allowed.
Signals
void animatingChanged(bool animating)Effective timer state after policy and visibility.
void gpuAccelerationEnabledChanged(bool enabled)Permit an optional Spatial compositor to accelerate painting; false by default.
Enumerations
enum EffectBuilt-in CPU particle effects.
FlowingRibbonsOrbiting ribbons and sparks.FloatingDotsSoft lights drifting upward.StarfieldStars moving toward the viewer.
enum BackgroundModeBackground composition.
TransparentSolid
Destructors
Subclass interfaces
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)Component-facing token accessors.
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 named state, or clears state when name is empty.
void addState(const QMLState& state)Registers or replaces a named state definition.
void evaluateStates()Reevaluates conditions; the first registered true condition wins.
QMLPlusRuntime* runtime()Returns the lazy host-owned state observation object.
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 a source property to a property on the QWidget host.
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 for this host's managed property writes.
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.
All inherited Qt members:QWidget