1

QML: Modify extension settings tutorial a bit

Signed-off-by: Juraj Oravec <jurajoravec@mailo.com>
This commit is contained in:
Juraj Oravec 2022-04-04 23:41:11 +02:00
parent 112191b027
commit 066f8dd53c
Signed by: SGOrava
GPG Key ID: 13660A3F1D9F093B

View File

@ -11,6 +11,7 @@ only for small data storage like global user settings.
At first set the settings option `X-Falkon-Settings=true` in the desktop
file to tell Falkon the settings for the extension are available.
metadata.desktop
```ini
[Desktop Entry]
Name=Tutorial8 QML
@ -25,6 +26,7 @@ X-Falkon-Version=1.0.0
X-Falkon-Settings=true
```
main.qml
```qml
Falkon.Settings {
id: settings
@ -44,6 +46,9 @@ object. The available API can be found at
or
[code](https://github.com/KDE/falkon/blob/master/src/lib/plugins/qml/api/settings/qmlsettings.h)
The `settingsWindow` is same as button popup and sidebar content. It
contains some QMT element to draw stuff.
## Troubleshooting
If you try to use the Qt style settings syntax
`settings.value('key', 'default')` you will receive an error message