InfoBar QML Type
A severity-colored notification bar for displaying messages. More...
| Import Statement: | import FluentUI.Controls 1.0 |
Properties
- action : Component
- bottomPadding : int
- closable : bool
- iconVisible : bool
- leftPadding : int
- message : string
- messageItem : Component
- messageMaximumWidth : int
- onClickCloseListener : var
- rightPadding : int
- severity : int
- title : string
- titleItem : Component
- topPadding : int
Detailed Description
InfoBar displays contextual messages with a color-coded severity indicator. It supports customizable title, message, action buttons, and can be dismissed by the user. The severity level determines the background color and icon.
Usage Example
import QtQuick import FluentUI.Controls InfoBar { title: "Update available" message: "A new version is ready to install." severity: InfoBarType.Info closable: true }
Property Documentation
action : Component
An optional Component that provides action buttons displayed at the end of the InfoBar. This can be used to add "Undo", "Retry", or other contextual actions.
bottomPadding : int
The padding below the content area. Defaults to 12.
closable : bool
Whether the InfoBar displays a close button. Defaults to true. When set to false, the user cannot dismiss the InfoBar interactively.
iconVisible : bool
Whether the severity icon is shown. Defaults to true.
leftPadding : int
The padding to the left of the content area. Defaults to 12.
message : string
The detailed message text displayed below the title.
messageItem : Component
A custom Component replacing the default message label.
messageMaximumWidth : int
The maximum width of the message text area in pixels. Defaults to 520.
onClickCloseListener : var
A callback function invoked when the close button is clicked.
rightPadding : int
The padding to the right of the content area. Defaults to 12.
severity : int
The severity level of the notification. Defaults to InfoBarType.Info. Other possible values include InfoBarType.Success, InfoBarType.Warning, and InfoBarType.Error, each applying a distinct color scheme.
title : string
The title text displayed at the top of the InfoBar.
titleItem : Component
A custom Component replacing the default title label.
topPadding : int
The padding above the content area. Defaults to 12.