Status & info
InfoBar
An inline bar for status messages with severity and optional actions.
Example

Usage
Severity
Severity changes the leading icon and background treatment for status messages.
#include <FluentQt/StatusInfo.h>
using namespace fluent::status_info;
auto* info = new InfoBar(this);
info->setSeverity(InfoBar::Informational);
info->setTitle("Update available");
info->setMessage("Version 3.2 is ready.");
auto* error = new InfoBar(this);
error->setSeverity(InfoBar::Error);
error->setTitle("Upload failed");
error->setMessage("The document could not be saved.");
keepInfoBarOpenWithToast(info);
keepInfoBarOpenWithToast(error);import fluentqt
info = fluentqt.InfoBar()
info.setSeverity(fluentqt.InfoBar.InfoBarSeverity.Informational)
info.setTitle("Update available")
info.setMessage("Version 3.2 is ready.")
success = fluentqt.InfoBar()
success.setSeverity(fluentqt.InfoBar.InfoBarSeverity.Success)
success.setTitle("Saved")
success.setMessage("All changes were saved.")
warning = fluentqt.InfoBar()
warning.setSeverity(fluentqt.InfoBar.InfoBarSeverity.Warning)
warning.setTitle("Storage almost full")
warning.setMessage("Clear space before syncing.")
error = fluentqt.InfoBar()
error.setSeverity(fluentqt.InfoBar.InfoBarSeverity.Error)
error.setTitle("Upload failed")
error.setMessage("The document could not be saved.")API
DeclarationNo matching API members.
fluent::status_info::InfoBar
Inherits QWidget · FluentElement · QMLPlus
Fluent inline notification bar with severity, actions, and close behavior.
Constructors
Properties
bool isOpenWhether the popup, drawer, or notification surface is open.
ReadisOpen()WritesetIsOpen()NotifyisOpenChanged()QString titleTitle text displayed by the surface.
Readtitle()WritesetTitle()NotifytitleChanged()QString messageMessage body text displayed by the notification surface.
Readmessage()WritesetMessage()NotifymessageChanged()InfoBarSeverity severitySeverity level used by notification colors and icon.
Readseverity()WritesetSeverity()NotifyseverityChanged()bool isClosableWhether the close affordance is visible and active.
ReadisClosable()WritesetIsClosable()NotifyisClosableChanged()bool isIconVisibleWhether the severity icon is visible.
ReadisIconVisible()WritesetIsIconVisible()NotifyisIconVisibleChanged()bool singleLineWhether the notification uses compact single-line layout.
ReadsingleLine()WritesetSingleLine()NotifysingleLineChanged()int preferredWidthPreferred width used by the notification layout.
ReadpreferredWidth()WritesetPreferredWidth()NotifypreferredWidthChanged()int singleLineHeightHeight used by single-line notification layout.
ReadsingleLineHeight()WritesetSingleLineHeight()NotifysingleLineHeightChanged()int multiLineMinHeightMinimum height used by multi-line notification layout.
ReadmultiLineMinHeight()WritesetMultiLineMinHeight()NotifymultiLineMinHeightChanged()int multiLineActionMinHeightMinimum height when multi-line layout includes actions.
ReadmultiLineActionMinHeight()WritesetMultiLineActionMinHeight()NotifymultiLineActionMinHeightChanged()QWidget* actionWidgetOptional action widget hosted by the notification.
ReadactionWidget()WritesetActionWidget()NotifyactionWidgetChanged()QMargins contentMarginsMargins applied around the control content area.
ReadcontentMargins()WritesetContentMargins()NotifycontentMarginsChanged()int closeButtonSizeSize of the close button.
ReadcloseButtonSize()WritesetCloseButtonSize()NotifycloseButtonSizeChanged()QString closeButtonAccessibleNameAccessible name supplied by the application for the icon-only close button.
ReadcloseButtonAccessibleName()WritesetCloseButtonAccessibleName()NotifycloseButtonAccessibleNameChanged()int iconTextSpacingSpacing between icon and text content.
ReadiconTextSpacing()WritesetIconTextSpacing()NotifyiconTextSpacingChanged()int titleMessageSpacingSpacing between title and message text.
ReadtitleMessageSpacing()WritesetTitleMessageSpacing()NotifytitleMessageSpacingChanged()int cornerRadiusCorner radius used by the component background.
ReadcornerRadius()WritesetCornerRadius()NotifycornerRadiusChanged()int severityIconSizeBackground size reserved for the severity icon.
ReadseverityIconSize()WritesetSeverityIconSize()NotifyseverityIconSizeChanged()int severityIconGlyphSizeGlyph size used by the severity icon.
ReadseverityIconGlyphSize()WritesetSeverityIconGlyphSize()NotifyseverityIconGlyphSizeChanged()int severityIconBackgroundInsetInset applied to severity icon background painting.
ReadseverityIconBackgroundInset()WritesetSeverityIconBackgroundInset()NotifyseverityIconBackgroundInsetChanged()Typography::FontRole titleFontRoleTypography role used by title text.
ReadtitleFontRole()WritesetTitleFontRole()NotifytitleFontRoleChanged()Typography::FontRole messageFontRoleTypography role used by message text.
ReadmessageFontRole()WritesetMessageFontRole()NotifymessageFontRoleChanged()QString informationalIconGlyphIcon glyph used for informational severity.
ReadinformationalIconGlyph()WritesetInformationalIconGlyph()NotifyinformationalIconGlyphChanged()QString successIconGlyphIcon glyph used for success severity.
ReadsuccessIconGlyph()WritesetSuccessIconGlyph()NotifysuccessIconGlyphChanged()QString warningIconGlyphIcon glyph used for warning severity.
ReadwarningIconGlyph()WritesetWarningIconGlyph()NotifywarningIconGlyphChanged()QString errorIconGlyphIcon glyph used for error severity.
ReaderrorIconGlyph()WritesetErrorIconGlyph()NotifyerrorIconGlyphChanged()
Methods
bool isOpen() constWhether the popup, drawer, or notification surface is open.
void setIsOpen(bool open)Whether the popup, drawer, or notification surface is open.
QString title() constTitle text displayed by the surface.
void setTitle(const QString& title)Title text displayed by the surface.
QString message() constMessage body text displayed by the notification surface.
void setMessage(const QString& message)Message body text displayed by the notification surface.
InfoBarSeverity severity() constSeverity level used by notification colors and icon.
void setSeverity(InfoBarSeverity severity)Severity level used by notification colors and icon.
bool isClosable() constWhether the close affordance is visible and active.
void setIsClosable(bool closable)Whether the close affordance is visible and active.
bool isIconVisible() constWhether the severity icon is visible.
void setIsIconVisible(bool visible)Whether the severity icon is visible.
bool singleLine() constWhether the notification uses compact single-line layout.
void setSingleLine(bool singleLine)Whether the notification uses compact single-line layout.
int preferredWidth() constPreferred width used by the notification layout.
void setPreferredWidth(int width)Preferred width used by the notification layout.
int singleLineHeight() constHeight used by single-line notification layout.
void setSingleLineHeight(int height)Height used by single-line notification layout.
int multiLineMinHeight() constMinimum height used by multi-line notification layout.
void setMultiLineMinHeight(int height)Minimum height used by multi-line notification layout.
int multiLineActionMinHeight() constMinimum height when multi-line layout includes actions.
void setMultiLineActionMinHeight(int height)Minimum height when multi-line layout includes actions.
QWidget* actionWidget() constOptional action widget hosted by the notification.
void setActionWidget(QWidget* widget)Optional action widget hosted by the notification.
QMargins contentMargins() constMargins applied around the control content area.
void setContentMargins(const QMargins& margins)Margins applied around the control content area.
int closeButtonSize() constSize of the close button.
void setCloseButtonSize(int size)Size of the close button.
QString closeButtonAccessibleName() constAccessible name supplied by the application for the icon-only close button.
void setCloseButtonAccessibleName(const QString& name)Accessible name supplied by the application for the icon-only close button.
int iconTextSpacing() constSpacing between icon and text content.
void setIconTextSpacing(int spacing)Spacing between icon and text content.
int titleMessageSpacing() constSpacing between title and message text.
void setTitleMessageSpacing(int spacing)Spacing between title and message text.
int cornerRadius() constCorner radius used by the component background.
void setCornerRadius(int radius)Corner radius used by the component background.
int severityIconSize() constBackground size reserved for the severity icon.
void setSeverityIconSize(int size)Background size reserved for the severity icon.
int severityIconGlyphSize() constGlyph size used by the severity icon.
void setSeverityIconGlyphSize(int size)Glyph size used by the severity icon.
int severityIconBackgroundInset() constInset applied to severity icon background painting.
void setSeverityIconBackgroundInset(int inset)Inset applied to severity icon background painting.
Typography::FontRole titleFontRole() constTypography role used by title text.
void setTitleFontRole(Typography::FontRole role)Typography role used by title text.
Typography::FontRole messageFontRole() constTypography role used by message text.
void setMessageFontRole(Typography::FontRole role)Typography role used by message text.
QString informationalIconGlyph() constIcon glyph used for informational severity.
void setInformationalIconGlyph(const QString& glyph)Icon glyph used for informational severity.
QString successIconGlyph() constIcon glyph used for success severity.
void setSuccessIconGlyph(const QString& glyph)Icon glyph used for success severity.
QString warningIconGlyph() constIcon glyph used for warning severity.
void setWarningIconGlyph(const QString& glyph)Icon glyph used for warning severity.
QString errorIconGlyph() constIcon glyph used for error severity.
void setErrorIconGlyph(const QString& glyph)Icon glyph used for error severity.
Signals
void isOpenChanged(bool open)Whether the popup, drawer, or notification surface is open.
void titleChanged(const QString& title)Title text displayed by the surface.
void messageChanged(const QString& message)Message body text displayed by the notification surface.
void severityChanged(InfoBarSeverity severity)Severity level used by notification colors and icon.
void isClosableChanged(bool closable)Whether the close affordance is visible and active.
void isIconVisibleChanged(bool visible)Whether the severity icon is visible.
void singleLineChanged(bool singleLine)Whether the notification uses compact single-line layout.
void preferredWidthChanged(int width)Preferred width used by the notification layout.
void singleLineHeightChanged(int height)Height used by single-line notification layout.
void multiLineMinHeightChanged(int height)Minimum height used by multi-line notification layout.
void multiLineActionMinHeightChanged(int height)Minimum height when multi-line layout includes actions.
void actionWidgetChanged(QWidget* widget)Optional action widget hosted by the notification.
void contentMarginsChanged(const QMargins& margins)Margins applied around the control content area.
void closeButtonSizeChanged(int size)Size of the close button.
void closeButtonAccessibleNameChanged(const QString& name)Accessible name supplied by the application for the icon-only close button.
void iconTextSpacingChanged(int spacing)Spacing between icon and text content.
void titleMessageSpacingChanged(int spacing)Spacing between title and message text.
void cornerRadiusChanged(int radius)Corner radius used by the component background.
void severityIconSizeChanged(int size)Background size reserved for the severity icon.
void severityIconGlyphSizeChanged(int size)Glyph size used by the severity icon.
void severityIconBackgroundInsetChanged(int inset)Inset applied to severity icon background painting.
void titleFontRoleChanged(Typography::FontRole role)Typography role used by title text.
void messageFontRoleChanged(Typography::FontRole role)Typography role used by message text.
void informationalIconGlyphChanged(const QString& glyph)Icon glyph used for informational severity.
void successIconGlyphChanged(const QString& glyph)Icon glyph used for success severity.
void warningIconGlyphChanged(const QString& glyph)Icon glyph used for warning severity.
void errorIconGlyphChanged(const QString& glyph)Icon glyph used for error severity.
Enumerations
enum InfoBarSeverityInformationalSuccessWarningError
Destructors
PySide6 additions
takeActionWidget()Release and return the current action as Python-owned content.
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