Hi,

I place the ConfigurationGroup in the root item

harbour-appname.qml:

....
ConfigurationGroup {
    id: settings
    path: "/apps/harbour-appname"

    property bool boolVal: true
    property int intValue: 5
}
....

So it's accessible anywhere.
Then I'm binding the values to some others:

SomePage.qml:
...
Label{
    property bool thisBool: settings.boolVal
    text: settings.intValue * thisBool}
}
...

And I write directly to "settings":
...
Button {
    onClicked: settings.boolVal = !settings.boolVal
}
...

So values are stored immediately after changing them and restored after startup.

cheers, Michael.

Am 07.02.2017 um 13:46 schrieb Dylan Van Assche via Devel:
Hi devs,

Currently I'm struggling with the org.nemomobile.configuration QML module.
On the SailfishOS Reference pages is explained which properties this
module has but I can't find any examples there.
After some Googling I found some examples on how to use
ConfigurationValue {} but I want to group several settings together in a
ConfigurationGroup {}.
Does anyone a simple example on how to use ConfigurationGroup {}?

Thanks & have a nice day,
Dylan Van Assche aka modulebaan






_______________________________________________
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

_______________________________________________
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

Reply via email to