40 lines
845 B
Markdown
40 lines
845 B
Markdown
# Falkon QML Tutorial - 5. Using notifications
|
|
|
|
Hello, in this chapter I will show you how to use Falkon notifications.
|
|
|
|
|
|
## Create notification
|
|
|
|
```qml
|
|
Falkon.Notifications.create({
|
|
heading: i18n('Hello QML'),
|
|
message: i18n('First qml plugin action works :-)'),
|
|
icon: 'extensions.svg'
|
|
})
|
|
```
|
|
|
|
## Arguments
|
|
|
|
### heading
|
|
Notification header
|
|
|
|
### message
|
|
The body of the notification
|
|
|
|
### icon
|
|
Either system icon or file provided by extension.
|
|
|
|
|
|
## Example
|
|
The example code will add a button to main toolbar and statusbar. When
|
|
user clicks on the button a notification will show up.
|
|
|
|
![Notification](../images/tutorial5/notification.png)
|
|
|
|
Keep in mind that the form and shape of my notifications can be
|
|
different from yours.
|
|
|
|
### Code
|
|
The code for this example can be found at
|
|
[extensions/qml_tutorial_5](../extensions/qml_tutorial_5)
|