1
FalkonTutorials/qml/articles/5.Using_notifications.md
Juraj Oravec 7ee07ad363
Style and naming correction
Signed-off-by: Juraj Oravec <jurajoravec@mailo.com>
2022-03-29 22:41:19 +02:00

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)