A nice little way to fire a Info banner on QML without creating loads of the same component on different pages.
First you need to import the right module
import com.nokia.extras 1.1
Now it's better to put this in your main.qml or whatever the very first page that is loaded:
InfoBanner {
id: infoBanner
function showText(text) {
infoBanner.text = text
infoBanner.open()
}
}
You have the function shown here :
function showText(text) {
infoBanner.text = text
infoBanner.open()
Now that the Infobanner is defined you can place this following code wherever you want to show the InfoBanner
infoBanner.showText(qsTr("Note Is Already Empty"))
So you have the Infobanner's id :
infoBanner.
Then the show text function that was defined earlier:
showText
And put your text in between the quotation marks.
This can also be done on components like a CommonDialog.