1
FalkonTutorials/qml/articles/5.Using_notifications.md
Juraj Oravec 77a28db48e
Rename image and extension subfolders by category
Signed-off-by: Juraj Oravec <jurajoravec@mailo.com>
2022-04-27 22:49:06 +02:00

40 lines
849 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/qml_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)