Qt Reference Documentation

Maemo 5 Information Box Example


This example shows how to use Maemo 5 "Banners" and "Notes". Please refer to the Maemo 5 style guide for more information about these two concepts.

Screenshot of the Information Box example

         QMaemo5InformationBox::information(this, "This is a Maemo5 <b>banner</b>",

The static function QMaemo5InformationBox::information() with a timeout of QMaemo5InformationBox::DefaultTimeout shows a Maemo 5 "Banner". The text can be rich text and is passed to QLabel::setText().

         QMaemo5InformationBox::information(this, "This is a Maemo5 <b>note</b>",

When calling QMaemo5InformationBox::information() with no timeout, a Maemo 5 "Note" is shown. It will stay on the screen until the user clicks it away.

         QMaemo5InformationBox *box = new QMaemo5InformationBox(this);
         QTextBrowser *textBrowser = new QTextBrowser(box);
         textBrowser->setText("This is a Maemo5 <b>note</b> containing custom widget");

In addition to calling the static function that can only show text, it is possible to create a QMaemo5InformationBox instance and set any custom widget on it. In this example, a QTextBrowser is used.


Thank you for giving your feedback.

Make sure it is related to this specific page. For more general bugs and requests, please use the Qt Bug Tracker.

[0]; s.parentNode.insertBefore(ga, s); })();