Status & info
SplashScreen
Cover a content area during startup, report progress, and dismiss when ready.
Example

Usage
Application startup
Branded is the default light reveal. Select Simple for the centered loading ring, or replay the transition.
#include <FluentQt/StatusInfo.h>
using namespace fluent::status_info;
auto* root = new QWidget(this);
auto* layout = new QVBoxLayout(root);
layout->setContentsMargins(0, 0, 0, 0);
layout->setSpacing(12);
const QIcon appIcon(":/app/assets/app-icon.png");
auto* host = new fluent::layout::Card(root);
host->setObjectName("splashPreviewHost");
host->setAppearance(fluent::layout::Card::Canvas);
host->setBorderVisible(false);
host->setFixedHeight(400);
auto* contentLayout = new QVBoxLayout(host);
contentLayout->setContentsMargins(24, 24, 24, 24);
auto* header = new QHBoxLayout;
auto* logo = new Label(host);
logo->setObjectName("splashDestinationIcon");
logo->setFixedSize(28, 28);
header->addWidget(logo);
header->addWidget(new Label("FluentQt Gallery", host));
contentLayout->addLayout(header);
contentLayout->addStretch();
auto* splash = new SplashScreen(host);
splash->setObjectName("sampleSplash");
splash->setIcon(appIcon);
splash->setTitle("FluentQt");
splash->setSubtitle("Small details. Fluent experiences.");
splash->setText("Starting FluentQt Gallery");
splash->setTransitionTarget(logo);
QObject::connect(splash, &SplashScreen::dismissed, logo,
[logo, appIcon]() { logo->setPixmap(appIcon.pixmap(28, 28)); });
splash->show();
// Demo timing only; applications report actual work and call dismiss when ready.
auto* loading = new QVariantAnimation(splash);
loading->setObjectName("sampleSplashLoading");
loading->setDuration(3600);
loading->setStartValue(0);
loading->setEndValue(120);
QObject::connect(loading, &QVariantAnimation::valueChanged, splash, [splash](const QVariant& value) {
const int step = value.toInt();
splash->setProgress(qMax(0, step - 20), 100);
splash->setIndeterminate(step < 20);
splash->setText(step < 100 ? "Loading resources" : "Opening Gallery");
});
QObject::connect(loading, &QVariantAnimation::finished, splash, &SplashScreen::dismiss);
auto restart = [splash, loading, logo]() {
loading->stop();
splash->hide();
logo->clear();
splash->setIndeterminate(true);
splash->show();
loading->start();
};
auto* presentation = new fluent::basicinput::ComboBox(root);
presentation->setObjectName("splashPresentation");
presentation->setAccessibleName("Splash presentation");
presentation->addItems({"Branded", "Simple"});
QObject::connect(presentation, QOverload<int>::of(&QComboBox::currentIndexChanged), splash,
[splash, restart](int index) {
splash->setPresentation(index == 0 ? SplashScreen::Presentation::Branded
: SplashScreen::Presentation::Simple);
restart();
});
auto* replay = new Button("Replay startup", root);
replay->setObjectName("replaySplashButton");
replay->setFluentStyle(Button::ButtonStyle::Accent);
QObject::connect(replay, &Button::clicked, splash, restart);
auto* controls = new QHBoxLayout;
controls->addWidget(presentation);
controls->addStretch();
controls->addWidget(replay);
layout->addWidget(host);
layout->addLayout(controls);import fluentqt
from PySide6.QtCore import QVariantAnimation
from PySide6.QtGui import QIcon
from PySide6.QtWidgets import QHBoxLayout, QVBoxLayout
from importlib.resources import files
# Gallery-only preview drawing/model helpers are omitted.
root = SplashScreenSampleSurface()
layout = QVBoxLayout(root)
layout.setContentsMargins(0, 0, 0, 0)
layout.setSpacing(12)
app_icon = QIcon(str(files("fluentqt_gallery") / "assets" / "app-icon.png"))
host = fluentqt.Card(root)
host.setObjectName("splashPreviewHost")
host.setAppearance(fluentqt.Card.Appearance.Canvas)
host.setBorderVisible(False)
host.setFixedHeight(400)
content_layout = QVBoxLayout(host)
content_layout.setContentsMargins(24, 24, 24, 24)
header = QHBoxLayout()
logo = fluentqt.Label(host)
logo.setObjectName("splashDestinationIcon")
logo.setFixedSize(28, 28)
header.addWidget(logo)
header.addWidget(fluentqt.Label("FluentQt Gallery", host))
content_layout.addLayout(header)
content_layout.addStretch()
splash = fluentqt.SplashScreen(host)
splash.setObjectName("sampleSplash")
splash.setIcon(app_icon)
splash.setTitle("FluentQt")
splash.setSubtitle("Small details. Fluent experiences.")
splash.setText("Starting FluentQt Gallery")
splash.setTransitionTarget(logo)
splash.dismissed.connect(lambda: logo.setPixmap(app_icon.pixmap(28, 28)))
splash.show()
# Demo timing only; applications report actual work and call dismiss when ready.
loading = QVariantAnimation(splash)
loading.setObjectName("sampleSplashLoading")
loading.setDuration(3600)
loading.setStartValue(0)
loading.setEndValue(120)
def update_progress(value):
splash.setProgress(max(0, int(value) - 20), 100)
splash.setIndeterminate(value < 20)
splash.setText("Loading resources" if value < 100 else "Opening Gallery")
loading.valueChanged.connect(update_progress)
loading.finished.connect(splash.dismiss)
def replay_startup():
loading.stop()
splash.hide()
logo.clear()
splash.setIndeterminate(True)
splash.show()
loading.start()
presentation = fluentqt.ComboBox(root)
presentation.setObjectName("splashPresentation")
presentation.setAccessibleName("Splash presentation")
presentation.addItems(["Branded", "Simple"])
def change_presentation(index):
mode = fluentqt.SplashScreen.Presentation
splash.setPresentation(mode(index))
replay_startup()
presentation.currentIndexChanged.connect(change_presentation)
replay = fluentqt.Button("Replay startup", root)
replay.setObjectName("replaySplashButton")
replay.setFluentStyle(fluentqt.Button.ButtonStyle.Accent)
replay.clicked.connect(replay_startup)
controls = QHBoxLayout()
controls.addWidget(presentation)
controls.addStretch()
controls.addWidget(replay)
layout.addWidget(host)
layout.addLayout(controls)API
DeclarationNo matching API members.
fluent::status_info::SplashScreen
Inherits QWidget · FluentElement · QMLPlus
Reusable startup surface covering its parent widget's content area.
Constructors
Properties
Presentation presentation- Read
presentation()WritesetPresentation()NotifypresentationChanged() QIcon icon- Read
icon()WritesetIcon()NotifyiconChanged() QSize iconSize- Read
iconSize()WritesetIconSize()NotifyiconSizeChanged() QString text- Read
text()WritesetText()NotifytextChanged() QString title- Read
title()WritesetTitle()NotifytitleChanged() QString subtitle- Read
subtitle()WritesetSubtitle()NotifysubtitleChanged() QWidget* transitionTarget- Read
transitionTarget()WritesetTransitionTarget()NotifytransitionTargetChanged() int progress- Read
progress()NotifyprogressChanged() bool indeterminate- Read
isIndeterminate()WritesetIndeterminate()NotifyindeterminateChanged()
Methods
void setPresentation(Presentation presentation)Selects the startup presentation without changing progress or ownership.
void setIconSize(const QSize& size)Sets the preferred artwork size; each dimension is at least one logical pixel.
void setText(const QString& text)Sets plain status text; long text is elided visually but remains accessible.
void setTitle(const QString& title)Sets the optional plain-text brand title shown in Branded presentation.
void setSubtitle(const QString& subtitle)Sets the optional plain-text subtitle shown below the brand title.
void setTransitionTarget(QWidget* target)Borrows an icon holder as the destination of the Branded dismissal.
void setProgress(int done, int total)Sets clamped determinate progress; total <= 0 selects indeterminate mode.
void dismiss()Dismisses, hides and emits dismissed once; repeated or hidden calls do nothing.
Signals
void replaced()Emitted after another cover hides this one on an overlapping host.
Enumerations
enum class PresentationBranded is the default light reveal; Simple retains the centered loading ring.
BrandedSimple
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