Qt Reference Documentation

QML InfoBanner Element

Shows the info banner. More...

This element was introduced in Qt Quick Components 1.0.

Properties

Signal Handlers

Methods

Detailed Description

The InfoBanner component is used to display information to the user. The number of lines of text is limited to three. The screenshot below shows an example of info banner.

Creating an InfoBanner

The code snippet below illustrates how to create an InfoBanner.

 // Create an info banner with no icon
 InfoBanner {
     id: banner
     text: "This is an info banner with no icon"
 }

 // Create an info banner with icon
 InfoBanner {
     text: "This is an info banner with icon"
     iconSource: "info_banner_thumbnail.png"
 }

 function showBanner1() {
     // set display time to 5000 ms, default is 3000 ms
     banner.timeout = 5000;
     // display info banner
     banner.open();
 }

 function showBanner2() {
     // disable "self-dismissing" timer, banner has to be dismissed manually
     banner.timeout = 0;
     // interactive infobanner. click signal will be triggered when clicked.
     banner.interactive =  true
     // display info banner
     banner.open();
 }

 function closeBanner() {
     // close info banner manually
     banner.close();
 }

Property Documentation

iconSource : url

The path of the icon image. The default value is "".


interactive : bool

The InfoBanner is interactive if the value is true; otherwise the InfoBanner is informative. The default value is false.


platformInverted : bool

Symbian:

If platformInverted is true, the component is visualized with the inverted style. For more information, see Using Inverted Style with Symbian Components. By default platformInverted is false.

This property group was introduced in Qt Quick Components 1.1.


text : string

Text to be displayed in the InfoBanner.


timeout : int

Enables or disables timer that dismisses the InfoBanner. The InfoBanner stays open if the timeout value is 0. The default value is 3000.


Signal Handler Documentation

InfoBanner::clicked ()

This signal is emitted when the interactive InfoBanner is pressed and then released.


Method Documentation

InfoBanner::close ()

Hides the InfoBanner component.


InfoBanner::open ()

Displays the InfoBanner component.